protected override void write() { _postStream = new BytesWriteStream(); _postStream.setWriteLenLimit(ShineSetting.msgBufSize); //协议号 _postStream.natureWriteUnsignedShort(this.getDataID()); if (_needFullWrite) { writeBytesFull(_postStream); } else { writeBytesSimple(_postStream); } }
protected override void doWriteToStream(BytesWriteStream stream) { //直接协议号和内容 stream.natureWriteUnsignedShort(_dataID); doWriteBytesSimple(stream); }