internal class ClientSocketConnection()

in src/Azure.AppService.Tunnel/Tunnel/Sockets/ClientSocketConnection.cs [8:22]


internal class ClientSocketConnection(Lifetime lifetime) : SocketConnection(lifetime)
{
    public Task ConnectAndStartProcessing(int port)
    {
        var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
        {
            NoDelay = true
        };

        socket.Connect(new IPEndPoint(IPAddress.Loopback, port));
        Socket.SetIfEmpty(socket);

        return StartProcessingMessages();
    }
}