sockpp icon indicating copy to clipboard operation
sockpp copied to clipboard

Broken example 'tcpecho'

Open MarcelDev opened this issue 1 year ago • 5 comments

I was trying to run the tcpecho example but for some reason it doesn't work


Error connecting to server at: 'localhost':
        A non-blocking socket operation could not be completed immediately

The examples are from the master branch

MarcelDev avatar Feb 11 '24 16:02 MarcelDev

The tcpecho program is a client. It can talk to the tcpechosvr (server) program. First open a second console window and run the server. Then run the client.

fpagliughi avatar Feb 11 '24 21:02 fpagliughi

Also note that, as stated in the README, the master branch may not be stable, as we’re working toward a 2.0 version.

it would be better to download the latest release to try out the library.

fpagliughi avatar Feb 11 '24 21:02 fpagliughi

The tcpecho program is a client. It can talk to the tcpechosvr (server) program. First open a second console window and run the server. Then run the client. that is what i did

MarcelDev avatar Feb 12 '24 19:02 MarcelDev

Dunno. I just tried it on Linux (Mint 21/Ubuntu 22.04) and it works fine.

What platform/OS are you trying? Could another application be bound to that port? (I think it defaults to 12345). Could some security software or firewall be getting in the way? Can you make network connections using any other software?

For example, if you run tcpechosvr in one window, you can interact with it using a standard, old, telnet:

$ telnet localhost 12345                                                                                       
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Hello world!
Hello world!

fpagliughi avatar Feb 13 '24 04:02 fpagliughi

Did you get this resolved? Anything more I need to look into?

fpagliughi avatar Feb 26 '24 14:02 fpagliughi

Closing from a lack of feedback. Please feel free to re-open if there are continues problems.

fpagliughi avatar Apr 03 '24 15:04 fpagliughi