Results 1 to 8 of 8

Thread: Sockets.Net Vs Winsock

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2003
    Location
    Porto Alegre, RS
    Posts
    210

    Sockets.Net Vs Winsock

    i am developing an application in vb.net that should use winsock, but .net doesn't have it.

    So i tried to use "System.Net.Sockets" package, but it takes about 10 seconds to connect, using vb6 winsock, inside vb.net, it takes only 1 second.

    Why? Shouldn't be faster the .Net package??

    Thank you,
    Guilherme Costa

  2. #2
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690
    I only have a couple of projects using sockets, but have not seen this problem. Things connect right away. Maybe post some code?

  3. #3
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    It must be related to your code specifically because I have used .NET sockets without any problem.

    Mike's all about beating me to the punch today!

  4. #4
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    Edneeis which socket classes do you use?
    \m/\m/

  5. #5
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Either the TCPClient or just the Socket class. Other than that I have a code sample from a book that helps get objects from a networkstream and I have tweaked it a lot so its more to my liking, I use that for some things too.

  6. #6
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    Hmm i was asking if you used some 3rd party(or made by yourself) wrapper classes
    \m/\m/

  7. #7
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Nope no 3rd party stuff, just the Framework classes or things I've made myself (sometimes with the help of that book sample code). The framework classes are actually pretty good, once you get the hang of them. Although it was hard, for me at least, to change my way of thinking about sockets from the VB6 days. At first I wanted an exact replica of the Winsock control but now I prefer the .NET Socket style. I generally just serialize objects to xml and send them through the socket to be deserialized at the other end. That way I'm will dealing with objects and there is less parsing, the socket is just for transportation.

  8. #8
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    hmm I see
    \m/\m/

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