This is the StreamSSL sample described in the CodeProject article at: http://www.codeproject.com/Articles/1000189/A-Working-TCP-Client-and-Server-With-SSL
It is licensed under the CodeProject Open License at http://www.codeproject.com/info/cpol10.aspx
A copy of the license is also available in the License.md file in the project at: https://github.com/david-maw/StreamSSL/blob/master/License.md.