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

Author Topic: Blocking functions trouble shooting.  (Read 2067 times)

0 Members and 1 Guest are viewing this topic.

golgoth

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
Blocking functions trouble shooting.
« on: November 08, 2010, 07:22:38 am »
Greetings,

I’m trying to pool a non-blocking TCP “Connect to Server” function like so:

      if (m_TcpSocket.Connect(m_IpAddressHost, m_Port) == sf::Socket::Done)
      {
/// do something.
      }

For some reason Server::Accept the connection at the other end but the Client::Connect never return sf::Socket::Done.

PS: I did try with a timeout and I’m getting the same result.

What I’m am missing?

Shimajda

  • Newbie
  • *
  • Posts: 17
    • View Profile
Blocking functions trouble shooting.
« Reply #1 on: November 11, 2010, 11:42:35 am »
If You're using 1.6 connect looks like this:
m_TcpSocket.Connect(m_Port, m_IpAddressHost)

Your connect returns anything? (sf::Socket::Disconnected, sf::Socket::Error)