Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Connections Winsock Problems

Status
Not open for further replies.

OverkillMonkey

Programmer
May 24, 2001
9
US
I have created a server and client application, and I made it so that the server accepts unlimited connections. I used the arrays, just as I had seen other people do. I created a counter on the server, just to make sure that more then one client CAN connect to the server, and surely as I load more clients the server number increases. Now, this program is a chat application. Anything that the client says gets sent to the server and displayed, and then sent back to the client and displayed. I attempted to run two clients, and thats where the problems began. What was supposed to happen was a chat room type of effect. Everything that my clientS say should be send to my SERVER and back to the clientS. But what happened was that the text that the client that connected the last sent would get through to the server fine, but it would not be send to the other client. And whatever that OTHER client sent to the server would appear as a blank line in the listbox. I have just discovered winsock yesterday, so I have very no idea of how to fix this. I do not know how to identify specific computers that connect to me...if I did then I may have been able to make it so that the infromation comming from the server would make it to all of the clients...but I don't know.
Please look at my code, and tell me what is wrong.

The server where the zipfile is contained is
64.224.112.177

and the derectory is
/64.224.112.177/shop/_vti_txt/test/Client_Server

Please, anyone that can help me out please do so.
 
When you receive a message from one of the clients, you're echoing it to all the other clients?

Chip H.
 
Yeah =), but I got it to work now! Thanks though. If you still want to help then look at my "Engines, Texturs, and other stuff" post.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top