you are recv'ing on the wrong socket. You are using tcp_sock(which is your listening socket), not the socket returned by the accept call. Change it to acc_tcp_sock and you should be good to go:
recv_len = recv( acc_tcp_sock, recv_buffer + bytes_recv,
3000 - bytes_recv, 0 );
Eld
2009-11-24 03:37:15