|
-
Jan 27th, 2004, 12:56 PM
#1
Thread Starter
Addicted Member
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
-
Jan 27th, 2004, 01:56 PM
#2
Frenzied Member
I only have a couple of projects using sockets, but have not seen this problem. Things connect right away. Maybe post some code?
-
Jan 27th, 2004, 01:57 PM
#3
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!
-
Jan 28th, 2004, 12:17 PM
#4
yay gay
Edneeis which socket classes do you use?
\m/  \m/
-
Jan 28th, 2004, 01:05 PM
#5
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.
-
Jan 28th, 2004, 01:07 PM
#6
yay gay
Hmm i was asking if you used some 3rd party(or made by yourself) wrapper classes
\m/  \m/
-
Jan 28th, 2004, 01:15 PM
#7
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.
-
Jan 28th, 2004, 01:17 PM
#8
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
|