net_socket.write()

socket.write(data[, encoding][, callback])

Sends data on the socket. The second parameter specifies the encoding in the case of a string--it defaults to UTF8 encoding.

Returns true if the entire data was flushed successfully to the kernel buffer. Returns false if all or part of the data was queued in user memory. 'drain' will be emitted when the buffer is again free.

The optional callback parameter will be executed when the data is finally written out - this may not be immediately.

doc_Nodejs
2016-04-30 04:40:37
Comments
Leave a Comment

Please login to continue.