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

Author Topic: closing a TCP socket  (Read 24532 times)

0 Members and 1 Guest are viewing this topic.

Regen

  • Newbie
  • *
  • Posts: 42
    • View Profile
    • Email
closing a TCP socket
« on: August 04, 2008, 12:39:25 pm »
Hi, What can cause this to happen:
"Failed to close socket"

it is this little line that wont work:
Code: [Select]
if(Client.IsValid())
     Client.Close();


the only thing the socket was used for is to get a clients socket, then copy it to another socket.
Why can't things just work?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
closing a TCP socket
« Reply #1 on: August 04, 2008, 01:13:45 pm »
Maybe you already closed the copy ? Which would explain the bug, as the socket still has a valid value, but has been closed.
Laurent Gomila - SFML developer

Regen

  • Newbie
  • *
  • Posts: 42
    • View Profile
    • Email
closing a TCP socket
« Reply #2 on: August 04, 2008, 01:14:47 pm »
Ah, thats true, i have closed the copy. thank you!
Why can't things just work?