Posted on 2008-06-09
I am using Winsock inside two programs. In one program, the code to startup the connection is working perfectly. This program is a simly command line where all it does is perform the connection, and send and recieve a little data, all this works fine.
I have another program. It's a windows API application, alot going on. I implement that exact same code, and when the connect method gets call, I'm not getting the socket back but an error. WSAECONNREFUSED. This is the error you get when the service is not at that address on that port. But it is.
I even know that the connection is somewhat happening. I am the developer of the server program as well. I can see the connection get made on the server.
Why might this be happening in the windows program, but no the command line?