Example #1
0
 void sendUpdateSocketState(WALLSOCKET_STATE newstate, short socketid)
 {
     packet pck = new packet(PACKET_TYPE.C_UPDATE_SOCKET_STATE);
     pck.writeShort(socketid);
     pck.writeByte((byte)newstate);
     send(pck);
 }
Example #2
0
 public bool sendPicture(loadTexture data, string name)
 {
     if (!data.isTextureLoaded()) return false;
     byte[] rawPicData = data.getImageData();
     packet pck = new packet(PACKET_TYPE.SC_SEND_PICTURE);
     pck.writeString(name);
     pck.writeLong(rawPicData.Length);
     for (int i = 0; i < rawPicData.Length; i++)
         pck.writeByte(rawPicData[i]);
     send(pck);
     return true;
 }