P_net_init, P_net_uninit 3porty | 2011-09-11 | libporty manual |
---|
P_net_init, P_net_uninit
#include <libporty/net/network.h>int P_net_init ();
int P_net_uninit ();Link with -lporty_net
P_net_init should be called before any P_net call. This call ensures all operating-system and/or socket library initializations are done. On UNIX systems this includes setting up ignore on SIGPIPE, on win32 it calls WSAStartup().The pair of this call is P_net_uninit which should be called at the end of the application. On some systems this ensures all pending operations are cancelled properly.
Both functions should be called only once per application. There are further restrictions on the context of these calls, imposed by different operating systems. These functions are not safe to be called from initialization/uninnitialization hooks of dynamic linked libs.
Both calls return 0 on success.
P_net_init, P_net_uninit 3porty | 2011-09-11 | libporty manual |
---|