Re: Asynchronous sock_sendmbuf
Re: Asynchronous sock_sendmbuf
- Subject: Re: Asynchronous sock_sendmbuf
- From: Josh Graessley <email@hidden>
- Date: Tue, 20 May 2008 08:45:39 -0700
Hi Igor,
When using sockets in the kernel or in user space, there is no way to
know, without polling, when the data has been sent. The send/sendmbuf
calls enqueue data in the socket buffer. In the case of a UDP socket,
the data goes right out. In the case of a TCP socket, the data stays
enqueued until it is acknowledged by the remote side. Whether you're
using blocking or non-blocking calls, the call is "done" as soon as
the data has been copied in to the send buffer for a TCP socket.
Notification from the upcall when there is more room in the send
buffer would be good but does not currently exist. This is a know
problem and it is being tracked by:
<rdar://problem/4833986> KPI socket upcall should notify on multiple
events
This still doesn't address the problem that the upcall itself does not
provide any information about what sort of event occurred. The socket
API in user space is pretty limited in the event notification it can
provide. The upcall is even worse because you can't distinguish
between read and write ready. This problem is being tracked by:
<rdar://problem/5534287> Upcalls could be better
-josh
On May 20, 2008, at 12:55 AM, Igor Mikushkin wrote:
Hello!
I'm using non-blocking sockets.
I couldn't find a way to get to know the result of send operation.
If I understand correctly upcall callback is called only when an
incoming data is available (I do not talk here about listen / accept).
So is there any way to get to know if my send operation is completed?
What is EWOULDBLOCK status for in sock_sendmbuf?
What does it mean?
Thanks.
Best Regards.
Igor
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden