razzaj
Sep 26th, 2000, 04:31 AM
Hi;
Lately I was asked to write a Server/MultiClient Instant Messenging application for my company. I figured out "Easy"
coz I already Wrote a peer to peer chat application before and it worked well.
I used this time TCP for transmitting info. Here is the way it Goes :
- Server Runs on NT IIS Platform
- ClientApps Run with Windows98 on Employee WorkStations.
- ClientApps Send identification Msg on StartUp
- Server updates DB
- Client Exchange Msgs Via Server ...
Ok that is basically what it does, pretty classic... Now it is up and running , but during developpment I faced some Unexpected Problems with winsock ...
Sometimes 2 different Chuncks of data arrive Concatinated as if they were one.
Sometimes the second DataPacket Doesnt Get there at all.
Even when I am sending the same data to different Client (each Client has his own Dedicated Winsock Control) through a simple loop .. the data sometimes wont get to some Clients.
The weirdest I have ever experienced was while debugging the client app , I ran the server on a different Computer (Server) then I started Debugging the Client. Sometimes when I terminate the client And run it back again I get Bunch of data I sent to myself in the Previous Run.
To make things work th way I want I used the winsock SendComplete() event, to resume Data Transmition.
Till now No problem has been reported ... But I would like to understand The Whys and Hows of winsock in order not to face the same problems next time . I know about Buggs in Winsock Control but if anyone knows Really how it works and can explain why I have been having these Problem. Please Help.
I hope I havent Bored you with the Description ButI wanted you Guys to know the Max in order to help
- thank you in advance -
Lately I was asked to write a Server/MultiClient Instant Messenging application for my company. I figured out "Easy"
coz I already Wrote a peer to peer chat application before and it worked well.
I used this time TCP for transmitting info. Here is the way it Goes :
- Server Runs on NT IIS Platform
- ClientApps Run with Windows98 on Employee WorkStations.
- ClientApps Send identification Msg on StartUp
- Server updates DB
- Client Exchange Msgs Via Server ...
Ok that is basically what it does, pretty classic... Now it is up and running , but during developpment I faced some Unexpected Problems with winsock ...
Sometimes 2 different Chuncks of data arrive Concatinated as if they were one.
Sometimes the second DataPacket Doesnt Get there at all.
Even when I am sending the same data to different Client (each Client has his own Dedicated Winsock Control) through a simple loop .. the data sometimes wont get to some Clients.
The weirdest I have ever experienced was while debugging the client app , I ran the server on a different Computer (Server) then I started Debugging the Client. Sometimes when I terminate the client And run it back again I get Bunch of data I sent to myself in the Previous Run.
To make things work th way I want I used the winsock SendComplete() event, to resume Data Transmition.
Till now No problem has been reported ... But I would like to understand The Whys and Hows of winsock in order not to face the same problems next time . I know about Buggs in Winsock Control but if anyone knows Really how it works and can explain why I have been having these Problem. Please Help.
I hope I havent Bored you with the Description ButI wanted you Guys to know the Max in order to help
- thank you in advance -