beelze
February 20th, 2004, 07:17 AM
I'm making a simple chat for two users with graphical interface. I've got a problem with implementing accept function and recv.
So I've created a socket, binded it and set to listen. When I write
ClientServ = accept(srv, NULL, NULL);
the program waits for connection and does nothing besides this.
I want the program to accept the connection and work normally until it appears (receiving user's commands, etc).
The same problem I have while calling recv() function - the program stops to respond to user. Shall I use some other functions?
So I've created a socket, binded it and set to listen. When I write
ClientServ = accept(srv, NULL, NULL);
the program waits for connection and does nothing besides this.
I want the program to accept the connection and work normally until it appears (receiving user's commands, etc).
The same problem I have while calling recv() function - the program stops to respond to user. Shall I use some other functions?