Ejemplo n.º 1
0
        // creates a new TcpStream for a connecting client
        internal TcpStream NewStream()
        {
            TcpStream client = new TcpStream(loop);

            NativeMethods.StreamAccept(Handle, client.Handle);
            client.ReadStart();
            //Logger.Log($"TcpStream {InternalHandle} client {client.InternalHandle} accepted.");
            return(client);
        }
Ejemplo n.º 2
0
        // creates a new TcpStream for a connecting client
        internal unsafe TcpStream NewStream()
        {
            IntPtr loopHandle = ((uv_stream_t *)InternalHandle)->loop;
            Loop   loop       = HandleContext.GetTarget <Loop>(loopHandle);

            TcpStream client = new TcpStream(loop);

            NativeMethods.StreamAccept(InternalHandle, client.InternalHandle);
            client.ReadStart();

            //Logger.Log($"{HandleType} {InternalHandle} client {client.InternalHandle} accepted.");

            return(client);
        }