There are some good "getting-started" examples on MSDN.
Socket Code Examples[
^]
It is better that you start looking there and kind of forget about the code you have written so far.
Especially look in the the
Asynchronous Server Socket Example.
(This is what Sergey is talking about)
The client can be either or, depending on your needs.