Created
June 7, 2013 18:55
-
-
Save piscisaureus/5731532 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Enable or disable blocking mode for a stream. | |
* | |
* When blocking mode is enables all writes complete synchronously. The | |
* interface remains unchanged otherwise, e.g. completion or failure of the | |
* operation will still be reported through a callback which is made | |
* asychronously. | |
* | |
* Relying too much on this API is not recommended. It is likely to change | |
* significantly in the future. | |
* | |
* On windows this currently works only for uv_pipe_t instances. On unix it | |
* works for tcp, pipe and tty instances. Be aware that changing the blocking | |
* mode on unix sets or clears the O_NONBLOCK bit. If you are sharing a handle | |
* with another process, the other process is affected by the change too, | |
* which can lead to unexpected results. | |
* | |
* Also libuv currently makes no ordering guarantee when the blocking mode | |
* is changed after write requests have already been submitted. Therefore it is | |
* recommended to set the blocking mode immediately after opening or creating | |
* the stream. | |
*/ | |
UV_EXTERN void uv_stream_set_blocking(uv_stream_t* handle, int blocking); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment