Stephen Toub's blog post is not a sockets tutorial; it's showing how to use custom awaitables to support extremely high-performance socket applications.
I recommend that you start with something like WebAPI or WCF and only use bare sockets if you have to. If you absolutely do need to use sockets, then I recommend that you first use TaskFactory.FromAsync
to wrap the Begin
/End
methods; this is slightly less efficient but an easier programming model. If performance tests indicate that your server isn't fast enough at this point, then you should use the custom awaiter approach from Stephen Toub's blog post.
The reason your server isn't working is because you're not listening nor accepting. I recommend you use WebAPI or WCF instead.