views:

63

answers:

1

Hi ,

Could someone please tell us if EWOULDBLOCK. works sendto()? If yes! please give an example ... thanks! If not, is there anything similar to accept error?

Thanks for your replies

+1  A: 

It's not entirely clear what you're asking. A Google search for sendto and EWOULDBLOCK would imply that it can be returned, yes. Any sending operation on a socket could theoretically run out of send-buffer space, which means the operating system would have to wait until such space became available, hence EWOULDBLOCK is a reasonable value to return for a non-blocking socket.

Kylotan
thanks for reply. I am trying to make client and server to communicate in asynchronous mode, although I have a problem with sendto.
make
How do you know you have a problem with it? It would be helpful if you stated what exactly is happening.
Kylotan
If you want really to help, I can share my codes with you ... What I am trying is to make client and server independent from each other. I mean when the client or server calls receive() , it would data available on receive() - as it can be the updated or the backuped (last received) - without waiting for send() . By trying to implement this, I get some problem with sendto() ... thanks again!
make
I think what people need to be able to help is details of the actual problem that you are having with `SendTo()`.
Len Holgate