There seems to be a problem with Listener.accept(socket). The program does not seem to execute past the conditional statement checking if the socket is accepted. For example, the program does not execute the system("Pause")
command.
int main()
{
const unsigned ServerPort = 139;
sf::TcpListener Listener;
if(Listener.listen(ServerPort) != sf::Socket::Done)
cout << "Error! an error occurred" << endl;
else
cout << "Success! Listening at " << ServerPort << endl;
sf::TcpSocket socket;
if(Listener.accept(socket) != sf::Socket::Done) <-- Program just pauses
cout << "Error! Could not set socket" << endl;
system("Pause"); <-- Does not execute
return 0;
}
What could cause this problem?