I just started to learn ACE. I tried some of their simple examples and ran into a problem. This is my code:
int _tmain(int argc, _TCHAR* argv[])
{
ACE_INET_Addr server_addr;
ACE_SOCK_Acceptor acceptor;
ACE_SOCK_Stream stream;
if(server_addr.set(8888) == -1) return 1;
if(acceptor.open(server_addr, 1) == -1) return 1;
....
}
It always return -1 when I call acceptor.open(...)
. I'm a bit new to network programming. There isn't anything wrong with the code as far as I can tell. I'm programming on a laptop with Wi-fi, does that make a difference? Also I have firewall turned on. (Tried turning it off, no difference).
This is the server side program. Do I have to configure my computer somehow?
Any help would be appreciated.