P_net_async_stdio 3porty 2013-03-25 libporty manual

NAME

P_net_async_stdio

SYNPOSIS

#include <libporty/net_async/astdio.h>

int P_net_async_stdio (P_net_socket * stdin , P_net_socket * stdout );

Link with -lporty_net_async

DESCRIPTION

P_net_async_stdio copies non-blocking pollable sockets to stdio in stdin and stdout .

On some platforms this means setting stdio to nonblocking and return the fd (UNIX), not introducing any overhead. On other platforms, threads are started and data is relayed through local socket (win32) that has higher overhead. All these details are transparent to the caller.

RETURN VALUE

Returns 0 (and sets both pointers) on success or an error code from P_net_err n failure.

P_net_async_stdio 3porty 2013-03-25 libporty manual