예제 #1
0
        public bool TryReinitialize([NotNull] Socket socket, int signlinkId)
        {
            if (!socket.Connected)
            {
                return(false);
            }

            if (!CanReinitialize(signlinkId))
            {
                return(false);
            }

            DeadForMs    = 0;
            _msSinceData = 0;

            IsDisposed = false;
            _socket    = socket;

            // reset streams
            OutStream.ResetHeads();
            InStream = new CircularBlob(InStreamSize);

            return(true);
        }