fpagliughi / sockpp

Modern C++ socket library.
BSD 3-Clause "New" or "Revised" License
769 stars 126 forks source link

Broken example 'tcpecho' #96

Closed MarcelskyXD closed 3 months ago

MarcelskyXD commented 5 months ago

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

fpagliughi commented 5 months ago

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 commented 5 months ago

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.

MarcelskyXD commented 5 months ago

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

fpagliughi commented 5 months ago

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 commented 4 months ago

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

fpagliughi commented 3 months ago

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