Beispiel #1
0
            private void ReceiveRequest()
            {
                var requestLine = _clientStream.ReadLine();

                if (requestLine == "")
                {
                    return;
                }
                _session.Request.RequestLine = requestLine;
                _session.Request.Headers     = _clientStream.ReadHeaders();
            }
Beispiel #2
0
            private void ReceiveResponse()
            {
                var statusLine = _serverStream.ReadLine();

                if (statusLine == "")
                {
                    return;
                }
                _session.Response.StatusLine = statusLine;
                _session.Response.Headers    = _serverStream.ReadHeaders();
                if (HasBody)
                {
                    _session.Response.ReadBody(_serverStream);
                }
            }