| ||||||
| 5/17 |
| 2006/1/31-2/2 [Computer/SW/Languages] UID:41608 Activity:nil |
1/27 I have a file I want to stream to a socket. (Read file, write
socket) A loop that copies 1K at a time seems a bit silly, is
there a way to directly stream it?
\_ sendfile(), if you don't need to be terribly portable. -gm
\_ Perfect, thanks.
\_ netcat is ideal for this, its as simple as: nc < file |
| 5/17 |
|