A standalone winsock protocol out there?
Is there any class modules out there that can fully simulate the Microsoft winsock control? I've tried with CMasterSocket and it doesn't work well when it comes to UDP protocols.
I also tried VBIP.COM, but that site is down at the moment. Any ideas?
Good reputation given to those that can bring me something useful.
Re: A standalone winsock protocol out there?
How about just using the Winsock control? Why go to the trouble of using code that gives you the same thing?
Re: A standalone winsock protocol out there?
Hi,
I'm having this exact problem right now.
- I tried this one here but it appears to have bugs. You can try it though.
- I also saw "Tiny UDP" -- check that. I needed TCP though.
- I also tried about a zillion others, but for some reason or another I couldn't get them to work for me.
I'm currently trying to make my own, and it largely works, but I am working on getting one socket to listen and accepting the connection request in another socket, like we can do with the old Winsock. Maybe I'll ask for help in another thread.
In any case it does only TCP for now; so it won't help you. Sorry. But I'd definitely be interested in others that worked fine, without bugs, and were easy to use.
You can try searching at codeproject.com or planetsourcecode.com in the appropriate sections.
Quote:
How about just using the Winsock control? Why go to the trouble of using code that gives you the same thing?
Using COM objects in .NET apps isn't the best idea...
- Large overhead since it's wrapped in a big Interop .NET component.
- Can't be compiled or merged into the EXE so you get dependencies.
- The debugger won't work for its errors, it just talks about HRESULTs.
- etc. etc. etc.
Thanks all!
Re: A standalone winsock protocol out there?
Doesn't .Net already have all of its own stuff in its Socket library?
As far as Classic VB (5, 6) goes you might consider SocketWrench Freeware Edition. I'm not sure what you mean by "fully simulate" but SocketWrench doesn't do that. It has a different object model.
To get the Class version instead of the Control version of the component I think you have to license one of the for-pay editions of the product. The truth is I don't know of many good reasons to use SocketWrench Freeware in a VB program anymore. Maybe for somebody using a VB edition that doesn't include the Winsock control design-time license? It comes in handy for scripts though since it doesn't require a runtime license.
Re: A standalone winsock protocol out there?
Dilettante,
Thanks for your reply. I believe both Mathiaslylo and I are looking specifically for a .NET control/class, not an ActiveX/COM one.
Quote:
Doesn't .Net already have all of its own stuff in its Socket library?
Yes, but that functionality is quite hard to use for asynchronous connections (where I have the socket listening in the background and notify me, instead of having my code block till something happens).
Re: A standalone winsock protocol out there?
Ok, that makes sense.
Probably why there's a .Net version of SocketWrench (sadly no free edition).
I've done some very light dabbling with C# and VFred myself and noticed right away that the approach to sockets is quite different and seemed like a lot of work. I just attributed that to my inexperience though.