saghul / sjs

Skookum JS: a JavaScript runtime
http://sjs.saghul.net
MIT License
97 stars 13 forks source link

Create a non-blocking socket in a single syscall #39

Open saghul opened 8 years ago

saghul commented 8 years ago

On Linux we can create a socket in non-blocking mode in a single syscall by OR-ing the socket type with SOCK_NONBLOCK. Same applies when using accept4. Use it.