Results 1 to 6 of 6

Thread: A standalone winsock protocol out there?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2006
    Location
    Denmark
    Posts
    291

    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.

  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    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?
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

  3. #3
    New Member
    Join Date
    Apr 2007
    Posts
    7

    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.

    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!

  4. #4
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    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.

  5. #5
    New Member
    Join Date
    Apr 2007
    Posts
    7

    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.

    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).

  6. #6
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width