Skip to content

Instantly share code, notes, and snippets.

@igorzi
Created January 17, 2012 22:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save igorzi/1629476 to your computer and use it in GitHub Desktop.
Save igorzi/1629476 to your computer and use it in GitHub Desktop.
/*
* uv_tcp_info contains information about exported uv_tcp_t handle
* that can be used to initialize shared TCP servers within the
* same process.
*/
#ifdef _WIN32
typedef SOCKET uv_tcp_info;
#else
typedef int uv_tcp_info;
#endif
/*
* Exports uv_tcp_t handle as uv_tcp_info value, which could
* be used to initialize shared TCP servers within the same process.
*/
UV_EXTERN int uv_tcp_export(uv_tcp_t* handle, uv_tcp_info* info);
/*
* Imports uv_tcp_info value into uv_tcp_t handle to initialize
* shared TCP server.
*/
UV_EXTERN int uv_tcp_import(uv_tcp_t* handle, uv_tcp_info info);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment