Пример #1
0
 public override void SetEncoderDecoder(PacketEncoder packetEncoder, PacketDecoder packetDecoder)
 {
     _encoder?.Dispose();
     _decoder?.Dispose();
     _encoder = packetEncoder;
     _decoder = packetDecoder;
 }
Пример #2
0
 public override void Dispose()
 {
     _receiveBuffer.Dispose();
     _sendBuffer.Dispose();
     _encoder.Dispose();
     _decoder.Dispose();
     _socket.Dispose();
 }