-
Apr 13th, 2010, 09:35 PM
#1
Thread Starter
New Member
Fast VB6 socket control
I've been looking to upgrade the socket on a project of mine for a while, as I have had complaints of lag from the current one. I don't want to use WinSock either, because it's not as powerful as I would like. What is a good, fast, powerful, and free socket that is supported by VB6?
-
Apr 14th, 2010, 01:43 AM
#2
New Member
Re: Fast VB6 socket control
other than resorting to straight winapi, mswinsck i find is pretty good
are you sure its not a resource issue? each instance of that control takes up memory...
-
Apr 14th, 2010, 02:01 AM
#3
Re: Fast VB6 socket control
You may want to try this.
-
Apr 14th, 2010, 07:33 AM
#4
Re: Fast VB6 socket control
I would look elsewhere first if you are having performance problems, the Winsock control actually does fairly well. I have used it in several Windows Service projects to replace .Net applications that were too slow. Usually I get around 10 times the data throughput of the old .Net Service and in almost every case a 3 to 5 times improvement.
Almost all of the difference is in the quality of the code and architecture of the program.
That doesn't mean the Winsock control is without its limitations. I have had some server projects where I had to use a 3rd party "socket server" library in order to support large numbers of clients. But to do a lot better than with the Winsock control you have to go to I/O Completion Ports.
If you have less than 300 or so clients the Winsock control is usually fine.
One place people get into trouble is designing "chatty" protocols for things like file transfers. You do not want to use a scheme where you send a block of data and wait for the other end to send an acknowlegement, go ahead, send more sort of message. This will really degrade performance.
-
Apr 14th, 2010, 08:49 AM
#5
Re: Fast VB6 socket control
dee-u: unfortunatenaly UniSock, despite being coded quite powerful from the VB6 side, has problems with it's subclassing thunk and is crash prone. It needs an update to use the same subclassing thunk as CSocketMaster (which is known to be working), but I don't have the time & interest to do that. CSocketMaster's VB6 code is sloppy and inefficient.
I would say Winsock is the safe & good choice in most cases, just make sure you use it wisely as written by dilettante.
-
Apr 14th, 2010, 01:21 PM
#6
Re: Fast VB6 socket control
If you are convinced you need a better performing component than the Winsock control there are a number of options. Most of them don't make any sense in simple client programs though.
One that is free is A high performance TCP/IP socket server COM component for VB. You can find a newer version of this at Latest release of socket server code, which has the newest free version as far as I know.
The last time I looked seriously at that CSocket/CSocketMaster thing written in VB6 it was pretty warty. It had so many problems that you couldn't even use a socket object to connect more than one time. You had to destroy and create new sockets each time you needed to connect. There were also situations where it would lock up and not transfer data, but I never did isolate those. It might be better since then but it would take a lot to get me to even look at it again.
-
Apr 14th, 2010, 01:33 PM
#7
Re: Fast VB6 socket control
Yeah, I remember when implementing UniSock that I saw a number of oddities in CSocketMaster's code. I can't recall what they were in practical level, but I tried to fix what I could with UniSock. Unfortunatenaly I didn't choose a good subclassing thunk to use for Winsock use and noticed the problems only later on when I finally could do a few proper test runs. And ASM code is something I'm not familiar with that I could do changes or fixes.
-
Apr 14th, 2010, 03:44 PM
#8
Re: Fast VB6 socket control
It isn't something I found easy to do right myself. Using the Winsock API in a synchronous manner isn't too hard but I don't have much need for that. Those async calls can get a little tricky.
-
Apr 15th, 2010, 06:32 AM
#9
New Member
Re: Fast VB6 socket control
Originally Posted by dilettante
The code that I posted on codeproject back in 2002 still works pretty well but if you have problems with it please drop me an email or leave a comment on my blog. There are no open bugs with the COM object at this time.
-
Apr 16th, 2010, 12:22 AM
#10
Re: Fast VB6 socket control
Gosh, I didn't mean to ping Len, but I guess I did!
-
Apr 16th, 2010, 02:15 AM
#11
New Member
Re: Fast VB6 socket control
Originally Posted by dilettante
Gosh, I didn't mean to ping Len, but I guess I did!
The wonders of google alerts...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|