public static int Socket(Domain domain, Protocol protocol) { return(Interop.nn_socket((int)domain, (int)protocol)); }
/// <summary> /// Receives a message into an already allocated buffer /// If the message is longer than the allocated buffer, it is truncated. /// </summary> /// <returns> /// The length, in bytes, of the message. /// </returns> public static int Recv(int s, byte[] buf, SendRecvFlags flags) { return(Interop.nn_recv_array(s, buf, buf.Length, (int)flags)); }
public static string Symbol(int i, out int value) { return(Marshal.PtrToStringAnsi(Interop.nn_symbol(i, out value))); }
public static UInt64 GetStatistic(int s, int stat) { return(Interop.nn_get_statistic(s, stat)); }
public static int Bind(int s, string addr) { return(Interop.nn_bind(s, addr)); }
public static string StrError(int errnum) { return(Marshal.PtrToStringAnsi(Interop.nn_strerror(errnum))); }
public static int Device(int s1, int s2) { return(Interop.nn_device(s1, s2)); }
public static void Term() { Interop.nn_term(); }
public static int Shutdown(int s, int how) { return(Interop.nn_shutdown(s, how)); }
public static int Close(int s) { return(Interop.nn_close(s)); }
public static int Errno() { return(Interop.nn_errno()); }
public static int Connect(int s, string addr) { return(Interop.nn_connect(s, addr)); }
public static int Send(int s, byte[] buf, SendRecvFlags flags) { return(Interop.nn_send(s, buf, buf.Length, (int)flags)); }