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 1 Jahr, 3 Monate.

  • Autor
    Beiträge
  • #1699

    kitty

    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

    Thomas Christof
    Keymaster

    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.

Du musst angemeldet sein, um auf dieses Thema antworten zu können.