Example #1
0
        public SocketStream(Socket sock, RecordType streamType, bool readMode)
            : base(readMode)
        {
            if (sock == null)
            {
                throw new ArgumentNullException("sock");
            }
            else if (!streamType.IsStreamType())
            {
                throw new ArgumentException("streamType must be a stream record type");
            }

            Socket            = sock;
            RecordType        = streamType;
            IsDisposed        = false;
            LastFlushedStream = null;
        }