示例#1
0
 private void sendCRPPacket(int headType, CRPBody body)
 {
     byte[] bodyBytes = body.getBytes();
     byte[] packet    = new byte[CRPHead.LENGTH + bodyBytes.Length];
     BytesUtil.Append(packet, CRPHead.getHeadBytes(headType));
     BytesUtil.Append(packet, bodyBytes, CRPHead.LENGTH);
     tcpSocket.send(packet);
 }
示例#2
0
 private int checkDataType(byte[] head)
 {
     return(CRPHead.getType(head));
 }