About Socket Communication Errors

Asked 2 years ago, Updated 2 years ago, 105 views

Socket communication between laptop and desktop PC to create video transfer application. Due to the system, server is always on standby, client requests connection to server at set time, and sends data after connection. Client is desktop PC and server is laptop. Please let me know.

  • Laptops: Surface, Windows 8
  • Desktop PCs: DELL, Windows 7
  • routers:Cisco
  • Language: C++, Boost Library (using asio, etc.)
  • firewalls:Off
  • F-Secure

"The connection could not be made because it was rejected by the target computer"

  • Verify that this problem can be avoided if the role is reversed, i.e., the laptop is a client
  • I set up an Apache server and did the same thing, not my own app. As a result, I couldn't access it from my desktop PC if the laptop side became a server.
  • Wireshark saw the packet when executing the above Apache operation, but the laptop side (server) ACK was not received during the 3-way handshake. If the laptop is a client, the 3-way handshake succeeded

c++ socket boost

2022-09-30 14:52

1 Answers

To isolate problems, create a simple environment and
I think it's better to eliminate the possible causes one by one.

I think it is physically configured as follows, so

Laptops - Routers - Desktops

I thought the main possible causes were:

  • 1) Misconfiguration and bugs in client and server apps
  • 2)Other apps have used ports in the OS
    (You can check it on netstat, etc.)
  • 3) Firewalls and security software block communications within the OS
    (You can check it by disabling the firewall or security software.)
  • 4) Router interrupts communication

To isolate a problem, use the
Provide an environment that does not affect the router (such as connecting a laptop to a desktop PC to a hub...) and
I think we need to check if we can communicate.
If you are unable to communicate in this environment, verify that 1) through 3) is the cause.

If you can communicate in this environment without any problems,
4)Check the router configuration, as this is probably the cause.


2022-09-30 14:52

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.