Beispiel #1
0
        internal static unsafe void GetAddressInfo(
            IntPtr loopHandle,
            IntPtr handle,
            string node,
            string service,
            uv_getaddrinfo_cb callback)
        {
            Contract.Requires(loopHandle != IntPtr.Zero);
            Contract.Requires(handle != IntPtr.Zero);
            Contract.Requires(!string.IsNullOrEmpty(node) ||
                              !string.IsNullOrEmpty(service));

            int result = uv_getaddrinfo(
                loopHandle,
                handle,
                callback,
                node,
                service,
                null);

            if (result < 0)
            {
                throw CreateError((uv_err_code)result);
            }
        }
Beispiel #2
0
        internal static unsafe void GetAddressInfo(
            IntPtr loopHandle,
            IntPtr handle,
            string node,
            string service,
            uv_getaddrinfo_cb callback)
        {
            Debug.Assert(loopHandle != IntPtr.Zero);
            Debug.Assert(handle != IntPtr.Zero);
            Debug.Assert(!string.IsNullOrEmpty(node) || !string.IsNullOrEmpty(service));

            int result = uv_getaddrinfo(
                loopHandle,
                handle,
                callback,
                node,
                service,
                null);

            ThrowIfError(result);
        }
Beispiel #3
0
 static extern unsafe int uv_getaddrinfo(IntPtr loopHandle, IntPtr handle, uv_getaddrinfo_cb cb, string node, string service, addrinfo *hints);
Beispiel #4
0
 internal static extern int uv_getaddrinfo(IntPtr loop, IntPtr req, uv_getaddrinfo_cb cb, string node, string service, IntPtr hints);
Beispiel #5
0
 internal static extern int uv_getaddrinfo(IntPtr loop, IntPtr req, uv_getaddrinfo_cb cb, string node, string service, IntPtr hints); // uv_loop_t*, uv_getaddrinfo_t* req, const struct addrinfo* hints
Beispiel #6
0
 protected override void InitDelegates()
 {
     base.InitDelegates();
     _connectDelegate = new uv_connect_cb(this.OnConnect);
     _resolveDelegate = new uv_getaddrinfo_cb(this.OnResolve);
 }
Beispiel #7
0
 protected override void InitDelegates()
 {
     base.InitDelegates();
     _connectDelegate = new uv_connect_cb(this.OnConnect);
     _resolveDelegate = new uv_getaddrinfo_cb(this.OnResolve);
 }