Click to See Complete Forum and Search --> : Winsock Control problem...
jdoverholt
Jun 7th, 2000, 02:51 AM
Help! I'm making a client/server app in VB using the Microsoft Winsock control and it's giving me hell. Sometimes, specific clients (all clients are using same software/runtime/client version/etc) will not be able to see what the server is sending to everyone. Then, after a bit of time (always random) it will all just come out at once. It seems to me like some kind of buffering error on the server side, does anyone have any suggestions?
Server is comprised of an array of Winsock controls (variable size, but in this case it contains 6 elements)
Winsock(0) is the one that listens, and Winsock(1) - (5) are the different connection modules.
The client only has 1 winsock control and seems to be functioning fully.
Thank you for your help!
Fox
Jun 12th, 2000, 12:46 AM
The Winsock control doesn't work correctly... It's a well-known bug and AFAIK there's no real solution. use DPlay ;)
IQM
Jun 26th, 2000, 11:58 PM
Try using multiple winsock controls, instead of just one. It worked for me.
Fox
Jun 27th, 2000, 01:43 AM
Well.. most time it works correctly...
however, you can seperate the messages sent by some token to split up the messages when receiving so it doesnt matter how much it queues before sending...
jdoverholt
Jul 4th, 2000, 11:02 AM
Well, I do have it parsing data, I always had that in there, that's not the point. It's not that data runs together sometimes, it's that sometimes the server just stops sending out what it's supposed to. Instead, it sits there and holds in for a couple minutes, and the sends it in lump. The client gets the lump and parses it like it's supposed to though.
However, I don't need any more help with this problem. I'm learning C++ and doing the same project in that. It's better, so...
No more winsock controls! Yay!
Thanks for help, everyone!
--Jonathan Overholt
--==* VB--->VC in 1 month *==--
SteveCRM
Jul 4th, 2000, 11:38 AM
Is microsoft going to try and fix this error?
privoli
Jul 10th, 2000, 08:20 AM
If you code is something like this...
For x = 1 to 10
Winsock(x).Senddata MessageStr
Next x
If you were to use that code it would only send to the last Winsock, due to the design of the Winsock control...
Try this code instead....
For x = 1 to 10
Winsock(x).Senddata MessageStr
DoEvents
Next x
Will correct the problem...
ckfoong
Jul 22nd, 2000, 04:10 AM
Hey there.. I've got a component wrapping the winsock controls in a DLL which manages the links and stuff using TCP/IP... would you be interesting in trying it out and such? Months was spent developing this component and we've proven it to work nicely without message dropouts and lags in a medical system here in Australia....
Let me know if you are interested...
ck
jdoverholt
Jul 23rd, 2000, 08:01 PM
Well, in the (months?) since my original post, I decided to learn C++, actually did learn enough C++ to completely redo my project in that (it works quite nicely now) and moved on to other things. I appreciate all the help that everyone has offered, and I hope it helps other people that were in my situation.
I, however, don't need anymore VB help. I'm using MS-VC6 now, and am quite happy with it's inherent power and speed. I suggest to anyone who's interested: "Learn C++, It's definately worth it."
elgin1980
Jul 23rd, 2000, 10:45 PM
Hi CK Foong,
I'm interested in your dll...we do major projects for clients using VB with Winsock, and we're always looking for faster network performance. Could I evaluate your dll? Of course, we'll pay you accordingly if we decide to use it.
elgin1980
Jul 23rd, 2000, 11:37 PM
Hi CK Foong,
I'm interested in your dll...we do major projects for clients using VB with Winsock, and we're always looking for faster network performance. Could I evaluate your dll? Of course, we'll pay you accordingly if we decide to use it.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.