C++ Winsock Program

I'm trying to make a simple client-server chat program in C++. I wrote this, but my problem is that I can just send data from the server to the client. I want to have a full-duplex communication, and send data from client to server too.