Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: TCP connection sending not working over global IP [Solved]  (Read 1988 times)

0 Members and 1 Guest are viewing this topic.

RhubarbMonster

  • Newbie
  • *
  • Posts: 1
    • View Profile
TCP connection sending not working over global IP [Solved]
« on: July 27, 2015, 12:38:53 pm »
Hey, I'm having an issue sending data between my client and server programs over global IP addresses that I just cant seem to figure out.

My set up is as follows:
- A server program running on my computer, sat behind a router
- The router has successfully been port forwarded so that incoming connections reach me
- A friends computer running my client program that sends a connection request to my server
- When the client is running on my local network or own computer, the connections work flawlessly

The issue here is that I am able to receive the clients connection request (confirmed), but I am not able to send a packet down the TCP connection from the server to the client with any data.

Calls to send packets down the connection are returning sf::Socket::Status::Done, so it seems to be succeeding. Am I missing something obvious here?

[Solved]
Thought I'd come back and update in case anyone had the same issue:

Turns out I had an awful case of the 'magic number' port. The brand of router I use just so happens to be blocking certain types of traffic on the port number I (semi) randomly picked.

Advice to those with a similar issue? Try at least 10 different ports if you're having no luck
« Last Edit: July 28, 2015, 03:26:21 pm by RhubarbMonster »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
AW: TCP connection sending not working over global IP
« Reply #1 on: July 28, 2015, 02:13:07 am »
Your friend probably sits behind a firewall, thus the packets from your server just get dropped.

See the network section in the FAQ.

Also you can use Wireshark on both ends to see what's going on.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/