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

Author Topic: SFML 2.1 - Sockets example not working  (Read 3012 times)

0 Members and 1 Guest are viewing this topic.

Janneman

  • Newbie
  • *
  • Posts: 11
    • View Profile
    • Email
SFML 2.1 - Sockets example not working
« on: November 06, 2013, 08:26:47 pm »
Hi all!

I'm trying to get the sockets example to work. If I run both server and client on the same computer, and then enter 'localhost' when the client asks for the server name, it works smoothly. But when I run them both on a seperate computer, no messages are sent at all. This problem occurs with TCP ánd UDP.
The computers both run windows 7 home premium 64bits, and I use sfml 2.1.
Do I maybe have to forward the ports of my router? Or what else can be the problem?

Thanks in advance :)
Janneman

TheRabbit

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: SFML 2.1 - Sockets example not working
« Reply #1 on: November 06, 2013, 08:30:52 pm »
Are you typing Localhost on the two separate computers? Local host basically tells the computer to connect to itself, so obviously that won't work when using 2 different computers.

Janneman

  • Newbie
  • *
  • Posts: 11
    • View Profile
    • Email
Re: SFML 2.1 - Sockets example not working
« Reply #2 on: November 06, 2013, 09:36:49 pm »
Yeah, I know. When I'm running client And server on the same computer, I use localhost, but on two computers I use the IP-adress of the computer the server runs on.

TheRabbit

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: SFML 2.1 - Sockets example not working
« Reply #3 on: November 06, 2013, 10:07:12 pm »
Are you port forwarding from your router to the server?

Janneman

  • Newbie
  • *
  • Posts: 11
    • View Profile
    • Email
Re: SFML 2.1 - Sockets example not working
« Reply #4 on: November 07, 2013, 09:11:43 am »
No, I didn't try that yet. When I get home, I'll try it.

 

anything