コード例 #1
0
        public void TcpConnect(Tcp client, string ip, int port, Action callback)
        {
            this._callback = callback;
            NativeSocketAddress address = NativeSocketAddress.GetIPv4(ip, port);

            NativeMethods.uv_tcp_connect(this, client, ref address, ConnectRequest.connectCallback);
        }
コード例 #2
0
ファイル: Udp.cs プロジェクト: Gscienty/AsyncIO.Net
        public Udp Bind(string ip, int port, UdpFlags flags)
        {
            NativeSocketAddress address = NativeSocketAddress.GetIPv4(ip, port);

            NativeMethods.uv_udp_bind(this, ref address, flags);
            return(this);
        }
コード例 #3
0
ファイル: UdpRequest.cs プロジェクト: Gscienty/AsyncIO.Net
 unsafe internal static extern int uv_udp_send(
     UdpRequest request,
     Udp udp,
     Structs.Buffer *buffers,
     int nbufs,
     ref NativeSocketAddress address,
     uv_udp_send_cb callback);
コード例 #4
0
ファイル: UdpRequest.cs プロジェクト: Gscienty/AsyncIO.Net
        unsafe public void Send(Udp udp, string ip, int port, ArraySegment <ArraySegment <byte> > buffers, Action sended)
        {
            this._callback = sended;

            this.FillngBuffers(buffers);
            NativeSocketAddress address = NativeSocketAddress.GetIPv4(ip, port);

            NativeMethods.uv_udp_send(
                this,
                udp,
                (Structs.Buffer *) this._buffersPointer,
                buffers.Count,
                ref address,
                UdpRequest._udpSendCallback
                );
        }
コード例 #5
0
 public static extern int uv_ip6_addr(string ip, int port, out NativeSocketAddress addr);
コード例 #6
0
 internal static extern int uv_tcp_connect(ConnectRequest connectRequest, Tcp client, ref NativeSocketAddress address, uv_connect_cb connectCallback);
コード例 #7
0
ファイル: Udp.cs プロジェクト: Gscienty/AsyncIO.Net
 internal static extern int uv_udp_getsockname(Udp handle, out NativeSocketAddress address, ref int length);
コード例 #8
0
ファイル: Udp.cs プロジェクト: Gscienty/AsyncIO.Net
 internal static extern int uv_udp_bind(Udp handle, ref NativeSocketAddress address, UdpFlags flags);