/**
  * request to oxd socket
  **/
 public function oxd_socket_request($data, $char_count = 8192)
 {
     $oxd_host_port = '';
     if ($this->getOxdHostPort()) {
         $oxd_host_port = $this->getOxdHostPort();
     } else {
         $oxd_host_port = $this->oxd_config['oxd_host_port'];
     }
     self::$socket = stream_socket_client($this->oxd_config['oxd_host_ip'] . ':' . $oxd_host_port, $errno, $errstr, STREAM_CLIENT_PERSISTENT);
     if (!self::$socket) {
         return 'Can not connect to oxd server';
     } else {
         fwrite(self::$socket, $data);
         $result = fread(self::$socket, $char_count);
         fclose(self::$socket);
         return $result;
     }
 }