SirCmpwn/ChatSharp — pull request #12 by RobKellett (2014-09-19 17:34:33+00:00)
Title: SSL support

I added support for SSL connections (IRCS). To do this, all input/output is done via streams instead of directly on the socket. For normal, unsecured connections, this stream is simply a `NetworkStream` wrapped around the `Socket`, but for secured sessions, it is an `SslStream` wrapped around a `NetworkStream` wrapped around the `Socket`. The I/O on streams is a bit more verbose than on the socket, but should be functionally equivalent.

Additionally, `IrcClient.Socket` was made private, since directly reading/writing to/from it will break SSL connections. Instead, `IrcClient.NetworkStream` is publicly exposed, which will work for both SSL and non-SSL connections. Lastly, `NetworkStream` doesn't support concurrent writes, so a write queue was implemented.

Everything works in the light testing I've done, but let me know if you have any concerns.