RE: sendfile to nonblocking socket

2007-04-24 Thread David Schwartz
> David Schwartz пишет: > > You have a misunderstanding about the semantics of 'sendfile'. > The 'sendfile' function is just a more efficient version of a > read followed by a write. If you did a read followed by a write, > it would block as well (in the read). > > > > DS > sendfile function

RE: sendfile to nonblocking socket

2007-04-24 Thread David Schwartz
David Schwartz пишет: You have a misunderstanding about the semantics of 'sendfile'. The 'sendfile' function is just a more efficient version of a read followed by a write. If you did a read followed by a write, it would block as well (in the read). DS sendfile function is not just

Re: sendfile to nonblocking socket

2007-04-23 Thread Alex Vorona
David Schwartz пишет: You have a misunderstanding about the semantics of 'sendfile'. The 'sendfile' function is just a more efficient version of a read followed by a write. If you did a read followed by a write, it would block as well (in the read). DS sendfile function is not just a more

Re: sendfile to nonblocking socket

2007-04-23 Thread Alex Vorona
David Miller wrote: From: voron <[EMAIL PROTECTED]> Date: Tue, 24 Apr 2007 00:13:27 +0300 As I see, nonblocking mode is enabled - sendfile sends less than asked. The socket is marked as non-blocking, but the disk I/O is not. It's blocking on the disk I/O not the socket part of the

RE: sendfile to nonblocking socket

2007-04-23 Thread David Schwartz
> As I see, nonblocking mode is enabled - sendfile sends less than asked. > But 2G via single 30 seconds sendfile call - this is blocking call. How > can I avoid that? I prefer sendfile as fastest way to send file > content to network socket. The problem with sendfile block on >

Re: sendfile to nonblocking socket

2007-04-23 Thread David Miller
From: voron <[EMAIL PROTECTED]> Date: Tue, 24 Apr 2007 00:13:27 +0300 > As I see, nonblocking mode is enabled - sendfile sends less than asked. The socket is marked as non-blocking, but the disk I/O is not. It's blocking on the disk I/O not the socket part of the operation. - To unsubscribe

Re: sendfile to nonblocking socket

2007-04-23 Thread David Miller
From: voron [EMAIL PROTECTED] Date: Tue, 24 Apr 2007 00:13:27 +0300 As I see, nonblocking mode is enabled - sendfile sends less than asked. The socket is marked as non-blocking, but the disk I/O is not. It's blocking on the disk I/O not the socket part of the operation. - To unsubscribe from

RE: sendfile to nonblocking socket

2007-04-23 Thread David Schwartz
As I see, nonblocking mode is enabled - sendfile sends less than asked. But 2G via single 30 seconds sendfile call - this is blocking call. How can I avoid that? I prefer sendfile as fastest way to send file content to network socket. The problem with sendfile block on nonblocking

Re: sendfile to nonblocking socket

2007-04-23 Thread Alex Vorona
David Miller wrote: From: voron [EMAIL PROTECTED] Date: Tue, 24 Apr 2007 00:13:27 +0300 As I see, nonblocking mode is enabled - sendfile sends less than asked. The socket is marked as non-blocking, but the disk I/O is not. It's blocking on the disk I/O not the socket part of the

Re: sendfile to nonblocking socket

2007-04-23 Thread Alex Vorona
David Schwartz пишет: You have a misunderstanding about the semantics of 'sendfile'. The 'sendfile' function is just a more efficient version of a read followed by a write. If you did a read followed by a write, it would block as well (in the read). DS sendfile function is not just a more