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

Author Topic: Failed to bind listener socket  (Read 2127 times)

0 Members and 1 Guest are viewing this topic.

CreaM

  • Newbie
  • *
  • Posts: 36
    • View Profile
Failed to bind listener socket
« on: June 22, 2014, 08:45:52 pm »
Hi
I read a few topics like this one, but I still dont know solution of my problem:
std::cout<<"LISTENNING - stop(0)\n";
                        listener.setBlocking(false);
                        while(true){
                                if(kbhit()){char stop = getch();
                                        if(stop == '0'){std::cout<<"listtenning stopped, return to main\n";return false;}
                                }
                                if (listener.listen(13129) != sf::Socket::Done)
                                        std::cout<<"aborted-er1\n";
                                if (listener.accept(p_socket[act_socketsCount]) == sf::Socket::Done){act_socketsCount ++;}
                                if (act_socketsCount == socketsCount){std::cout<<"all users conected\n";return true;}
                        }
 

- the point is that when i run the program it starst to write in console Failed to bind listener socket, but the program works OK (the clients can join normaly)- I just dont want that stuff in console.(or use something like cls...)
thanks for answers.

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Failed to bind listener socket
« Reply #1 on: June 27, 2014, 03:55:09 am »
The reason you haven't gotten any answers is because you did not follow the forum rules. Please post a complete and minimal example that we can test.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor