![]() |
sockets
These are my initializations, assume all is correct with connecting to windows etc... i want to recieve data form the client on the socket "incoming" and i want to send information to the client on socket "outgoing"
these are some form of my initializations, assume all is correct :
int incoming = socket(AF_INET, SOCK_DGRAM, 0);here is the psuedocode of what i want to do ... how can i do it? :
while(true)so what i want to do is keep sending data on the outgoing socket forever and ever. when i recieve data on the incoming socket, i want to stop sending on the outgoing socket and process the information i recieve on the incoming socket.. i have tried WSANETWORKEVENTS.. which didnt work out very well since i couldnt find proper sources.. can someone please give me proper code or link.. where i can see what i want to do in action so i can understand and do the same... thanks |
I'd imagine you want to use poll(), which means you will need to use non-blocking sockets. I would post links but I'm on a group dial-up right now and it takes about a minute to access a page. Search for: non-blocking i/o c++
|
| All times are GMT -5. The time now is 8:00 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC