Sign in to follow this  

send/recv client

This topic is 2014 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everyone!

I made a client-server app that should exchange data betwen them.. they connect.. all is ok but i want it to be like an instant messenger..
now i can just send data on one and recive on the other 1 ...and not do all things toghether... that's because recv just blocks and wait for a message...and my send/recv is in a loop so if one blocks... i wont be able to chat anymore till the other one responds...
So...how can i solve it please ?...how can u recv the message if there it is one and go on if there is nothing ?

Please help, Thanks :D

Share this post


Link to post
Share on other sites
[url=http://linux.die.net/man/2/select]I recommend select(), as it's the easiest way to get started.[/url]

There are also various tutorials on select() on the interwebs:
[url=http://beej.us/guide/bgnet/]beej[/url]
[url=http://www.gnu.org/software/libc/manual/html_node/Server-Example.html]gnu.org[/url]
[url=http://www.scottklement.com/rpg/socktut/selectserver.html]scottklement[/url]
[url=http://www.lowtek.com/sockets/select.html]lowtek[/url]
[url=http://msdn.microsoft.com/en-us/library/windows/desktop/ms740141(v=vs.85).aspx]WinSock[/url]

Share this post


Link to post
Share on other sites

This topic is 2014 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this