Пример #1
0
 internal AsyncLinker(Socket socket, NetExceptionProcess excProcess)
     : this(0, 0, excProcess)
 {
     this._socket = socket;
     _socket.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.NoDelay, true);
     _socket.NoDelay = true;
 }
Пример #2
0
 AsyncLinker(int sendBufferSize, int receiveBufferSize, NetExceptionProcess excProcess)
 {
     this._receiveStream     = new MyStream();
     this._sendStream        = new MyStream();
     this._sendBufferSize    = sendBufferSize;
     this._receiveBufferSize = receiveBufferSize;
     this._excProcess        = excProcess;
 }
Пример #3
0
        ThdLinker(int sendBufferSize, int receiveBufferSize, NetExceptionProcess excProcess)
        {
            this._sendTransitOct = new MyOctets();
            this._sendBuffer     = new MyStream();

            this._receiveTransitStream = new MyStream(1024);
            this._receiveBuffer        = new byte[1024];

            this._sendEvent = new AutoResetEvent(false);

            this._sendBufferSize    = sendBufferSize;
            this._receiveBufferSize = receiveBufferSize;
            if (excProcess == null)
            {
                throw new Exception("parameter 'excProcess' can't be null!!");
            }
            this._excProcess = excProcess;
        }
Пример #4
0
 public void Init(Action <ILinker> onLinkerAdd, NetExceptionProcess excProcess)
 {
     this._onLinkerAdd = onLinkerAdd;
     this._excProcess  = excProcess;
 }
Пример #5
0
 internal AsyncLinker(string host, int port, int sendBufferSize, int receiveBufferSize, NetExceptionProcess excProcess)
     : this(sendBufferSize, receiveBufferSize, excProcess)
 {
     this._host = host;
     this._port = port;
 }
Пример #6
0
 public ThdLinker(Socket soc, NetExceptionProcess excProcess)
     : this(0, 0, excProcess)
 {
     this._socket = soc;
 }