1 Replies - 3459 Views - Last Post: 12 January 2005 - 06:48 PM

#1 Aries   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 13
  • Joined: 10-January 05

Server Socket Problem

Posted 10 January 2005 - 05:31 PM

I'm working on a socket server/client application in C++ using wsa. If i open the client on my computer (server opened on the same comp too) and connect to the server it connects without a problem and sends and recieves data. But once I give the client to a friend to beta test he can't connect.
So then I decided to give the server to the friend, and I tried to connect from my client, the client did not connect. I checked the connection state using netstat and it seems that the socket did send the syn packet to request a connection just the server did not reply. My server uses WSAAsyncSelect() so when someone is trying to connect to my server the Socket Message is sent to my Window Proc and once the FD_ACCEPT is triggered i use the accept() since the socket is still a blocking socket when the accept() finishes it should have a successful connection. So then I debugged the server having a breakpoint on the case SOCKETMESSAGE:{}, and redid the whole thing,when my friend told me he failed to connect I noticed the breakpoint was never reached. Server is running on Win Xp Home Edition, my friend ran the program off win xp pro.

Is This A Good Question/Topic? 0
  • +

Replies To: Server Socket Problem

#2 Aries   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 13
  • Joined: 10-January 05

Re: Server Socket Problem

Posted 12 January 2005 - 06:48 PM

Alright well I fixed it. Problem was simple:
socket(AF_INET,SOCK_STREAM,0); - Old Code
socket(AF_INET,SOCK_STREAM,IPPROTO_TCP) - New Code that makes it work.
Thought 0 is the same thing. Oh well.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1