예제 #1
0
 public static int Socket(Domain domain, Protocol protocol)
 {
     return(Interop.nn_socket((int)domain, (int)protocol));
 }
예제 #2
0
 /// <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));
 }
예제 #3
0
 public static string Symbol(int i, out int value)
 {
     return(Marshal.PtrToStringAnsi(Interop.nn_symbol(i, out value)));
 }
예제 #4
0
 public static UInt64 GetStatistic(int s, int stat)
 {
     return(Interop.nn_get_statistic(s, stat));
 }
예제 #5
0
 public static int Bind(int s, string addr)
 {
     return(Interop.nn_bind(s, addr));
 }
예제 #6
0
 public static string StrError(int errnum)
 {
     return(Marshal.PtrToStringAnsi(Interop.nn_strerror(errnum)));
 }
예제 #7
0
 public static int Device(int s1, int s2)
 {
     return(Interop.nn_device(s1, s2));
 }
예제 #8
0
 public static void Term()
 {
     Interop.nn_term();
 }
예제 #9
0
 public static int Shutdown(int s, int how)
 {
     return(Interop.nn_shutdown(s, how));
 }
예제 #10
0
 public static int Close(int s)
 {
     return(Interop.nn_close(s));
 }
예제 #11
0
 public static int Errno()
 {
     return(Interop.nn_errno());
 }
예제 #12
0
 public static int Connect(int s, string addr)
 {
     return(Interop.nn_connect(s, addr));
 }
예제 #13
0
 public static int Send(int s, byte[] buf, SendRecvFlags flags)
 {
     return(Interop.nn_send(s, buf, buf.Length, (int)flags));
 }