Skip to content

Commit bf758e5

Browse files
committed
HTTPServer: Update the Test server to be concurrent and improve reading requests
- _TCPSocket is now only used for 1 socket, either a listener or client connection. - _HTTPServer now listens for a connection and returns a new _HTTPServer with the client connection. - Client _HTTPServer sub-servers are run in a Dispatch async() block to provide conncurrency for incoming connections. - When reading the request from the socket, _SocketDataReader() is now used to read, as `Data` not `String`, and look for appropiate HTTP separators (\r\n). - When reading chunked requests check for the length of each chunk and look for the terminating 0 byte chunk.
1 parent 69232d2 commit bf758e5

File tree

1 file changed

+196
-168
lines changed

1 file changed

+196
-168
lines changed

0 commit comments

Comments
 (0)