Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dio_write(3) [php man page]

DIO_WRITE(3)								 1							      DIO_WRITE(3)

dio_write - Writes data to fd with optional truncation at length

SYNOPSIS
int dio_write (resource $fd, string $data, [int $len]) DESCRIPTION
dio_write(3) writes up to $len bytes from $data to file $fd. PARAMETERS
o $fd - The file descriptor returned by dio_open(3). o $data - The written data. o $len - The length of data to write in bytes. If not specified, the function writes all the data to the specified file. RETURN VALUES
Returns the number of bytes written to $fd. SEE ALSO
dio_read(3). PHP Documentation Group DIO_WRITE(3)

Check Out this Related Man Page

SOCKET_WRITE(3) 							 1							   SOCKET_WRITE(3)

socket_write - Write to a socket

SYNOPSIS
int socket_write (resource $socket, string $buffer, [int $length]) DESCRIPTION
The function socket_write(3) writes to the $socket from the given $buffer. PARAMETERS
o $socket - o $buffer - The buffer to be written. o $length - The optional parameter $length can specify an alternate length of bytes written to the socket. If this length is greater than the buffer length, it is silently truncated to the length of the buffer. RETURN VALUES
Returns the number of bytes successfully written to the socket or FALSE on failure. The error code can be retrieved with socket_last_error(3). This code may be passed to socket_strerror(3) to get a textual explanation of the error. Note It is perfectly valid for socket_write(3) to return zero which means no bytes have been written. Be sure to use the === operator to check for FALSE in case of an error. NOTES
Note socket_write(3) does not necessarily write all bytes from the given buffer. It's valid that, depending on the network buffers etc., only a certain amount of data, even one byte, is written though your buffer is greater. You have to watch out so you don't uninten- tionally forget to transmit the rest of your data. SEE ALSO
socket_accept(3), socket_bind(3), socket_connect(3), socket_listen(3), socket_read(3), socket_strerror(3). PHP Documentation Group SOCKET_WRITE(3)
Man Page