Example #1
0
        //-------------------------------------------------------------------------------
        private void Initialize(SocketWrapperSettings settings)
        {
            this.settings = settings;

            packetsReceived = new Queue <BasePacket>();
            packetsToSend   = new Queue <BasePacket>();

            retryAttemptsLeft = settings.maxRetryAttempts;

            readBuffer = new byte[settings.bufferSize];

            memoryStream = new MemoryStream();
            binaryWriter = new BinaryWriter(memoryStream);
        }
Example #2
0
 //-------------------------------------------------------------------------------
 public SocketWrapper2(SocketWrapperSettings settings)
 {
     Initialize(settings);
 }