Beispiel #1
0
 public function getHsmInfo()
 {
     $str = "NC";
     $len1 = strlen($str);
     $buff = Bytes::shortToBytesBigEnd(intval($len1));
     $str = Bytes::toStr($buff) . $str;
     socket_write($this->socket, $str, strlen($str));
     $rsp1 = socket_read($this->socket, 2);
     $len2 = Bytes::bytesToShortBigEnd($rsp1, 0);
     $rsp2 = socket_read($this->socket, $len2);
     return $rsp2;
 }