ConnectionLost Event does not working

Startseite Foren C# Network Library Bugs ConnectionLost Event does not working

Dieses Thema enthält 1 Antwort und 2 Teilnehmer. Es wurde zuletzt aktualisiert von  Thomas Christof vor 11 Monate, 1 Woche.

  • Autor
  • #1699 Antwort


    ConnectionLost Event does not working.

    I made sample project as tutorial. But Connection lost does NOT work. Please fix it.

    serverConnectionContainer.ConnectionLost += (a, b, c) => Console.WriteLine($”{serverConnectionContainer.Count} {b.ToString()} Connection lost {a.IPRemoteEndPoint.Port}. Reason {c.ToString()}”);

  • #1722 Antwort

    Thomas Christof

    Hello Kitty!

    Sorry for the late reply.
    Is there a connection before the connection has been lost?
    When do you subscribe to the event?

    My first guess would be:
    1. There was never a connection, thus cant be lost
    2. There was a connection, has been lost, but the event subscription has taken place after it already has been lost.

Antwort auf: ConnectionLost Event does not working
Deine Information: