15 @date_default_timezone_set ( @date_default_timezone_get () );
17 require_once
'hce/transport/Connection.inc.php';
18 require_once
'hce/transport/Request.inc.php';
19 require_once
'hce/transport/Constants.inc.php';
21 require_once
'hce/admin/Constants.inc.php';
24 $messageBody =
'Admin' . HCE\admin\CMD_DELIMITER .
'ECHO' . HCE\admin\CMD_DELIMITER .
'' . HCE\admin\CMD_DELIMITER;
29 echo
'Connection created' . PHP_EOL;
31 $request = new \HCE\transport\Request (
$connection );
32 if (! $request->getErrorCode ()) {
33 echo
'Request created' . PHP_EOL;
38 echo
'Request executed' . PHP_EOL;
42 if ($response->getErrorCode ()) {
43 echo
'Error ' . $response->getErrorCode () .
' of request execution!' . PHP_EOL;
46 if ($response->getErrorCode () == \HCE\transport\PROTOCOL_ERROR_OK || $response->getErrorCode () == \HCE\transport\PROTOCOL_ERROR_WRONG_RESPONSE_MSG_ID) {
47 echo
'Response instance: ' . var_export ( $response,
true ) . PHP_EOL;
50 echo
'Error open connection!' . PHP_EOL;
53 echo
'Error ' . $request->error .
' create request instance with default initialization!' . PHP_EOL;
57 echo
'Error ' .
$connection->error .
' create connection instance with default initialization!' . PHP_EOL;