Hello All,
I have implemented the client server using socket programming in C on Unix OS. I have used the non blocking socket at client end. I want to implement the two way communication. But its working only with one way i.e. Client can read and write the data on server, but server can not read or write data on client.
Client
nread = recv(sock, ptr, nleft, MSG_DONTWAIT))
send(sock, ptr, nleft, 0))
Server
recv(sock, ptr, nleft, MSG_DONTWAIT))
SockWrite(sock, Message, dataLength)
Server is always facing problem in reading. Can any one explain me why and how to get rid of this?