Esempio n. 1
0
 internal static extern System.IntPtr mk_tcp_client_create(ref mk_tcp_client_events events, mk_tcp_type type);
Esempio n. 2
0
 /// <summary>
 /// 创建tcp客户端
 /// </summary>
 /// <param name="events">回调函数结构体</param>
 /// <param name="type">客户端类型</param>
 /// <returns>客户端对象</returns>
 public static System.IntPtr mk_tcp_client_create(ref mk_tcp_client_events events, mk_tcp_type type)
 => LibraryConst.IsWindows ? mk_tcp_windows.mk_tcp_client_create(ref events, type) : mk_tcp_unix.mk_tcp_client_create(ref events, type);
Esempio n. 3
0
 internal static extern ushort mk_tcp_server_start(ushort port, mk_tcp_type type);
Esempio n. 4
0
 /// <summary>
 /// 开启tcp服务器
 /// </summary>
 /// <param name="port">监听端口号,0则为随机</param>
 /// <param name="type">服务器类型</param>
 /// <returns></returns>
 public static ushort mk_tcp_server_start(ushort port, mk_tcp_type type)
 => LibraryConst.IsWindows ? mk_tcp_windows.mk_tcp_server_start(port, type) : mk_tcp_unix.mk_tcp_server_start(port, type);