|
off_t qSocketSaveIntoFile |
( |
int |
fd, |
|
|
int |
sockfd, |
|
|
off_t |
nbytes, |
|
|
int |
timeoutms | |
|
) |
| | |
Store socket data into file directly.
- Parameters:
-
| fd | file descriptor (out) |
| sockfd | socket descriptor (in) |
| nbytes | length of bytes to read from socket |
| timeoutms | wait timeout milliseconds |
- Returns:
- the number of bytes wrote on success, -1 if an error(ex:socket closed, file open failed) occurred.
- Since:
- 8.1R
- Note:
- timeoutms is not the total retrieving time. only affected if no data reached to socket until timeoutms reached. if some data are received, it will wait until timeoutms reached again.
Definition at line 377 of file qSocket.c.
|