Menu

TCPSession: client disconnected?

Help
2002-07-14
2002-07-21
  • A. S. Drury

    A. S. Drury - 2002-07-14

    i have a class called test::Client that extends TCPSession. when i telnet to server, it spawns a Client & everything works fine. however, when i use ^] quit to end the telnet connection, i can't figure out how to detect the broken connection. i tried Socket::isConnected(),  testing eof, &c, for *tcp(). using 1.9.7. suggestions appreciated.

     
    • A. S. Drury

      A. S. Drury - 2002-07-21

      it took some time, & it's probably not great use of common C++ lib, but here's a solution i  worked out: http://www.stcath.org/dev/socket.cpp.html#_solution

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.