|
-
Apr 16th, 2007, 02:19 PM
#1
Thread Starter
Hyperactive Member
When is bind supposed to be used?
About my own socket protocol I downloaded, I can't correctly use Socket.Connect to connect to a local network IP. Is this where Socket.Bind should be used?
-
Apr 19th, 2007, 08:44 AM
#2
Re: When is bind supposed to be used?
I use .Bind only for UDP-connections not for TCP!
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button
Wait, I'm too old to hurry!
-
Apr 19th, 2007, 11:02 AM
#3
Thread Starter
Hyperactive Member
Re: When is bind supposed to be used?
 Originally Posted by opus
I use .Bind only for UDP-connections not for TCP!
It IS a UDP connection. Now, when should it be used?
-
Apr 19th, 2007, 07:00 PM
#4
New Member
Re: When is bind supposed to be used?
As far as I know, Bind is used to accept connections / data only on a given network interface. By default it is bound to 0.0.0.0 meaning it accepts from any network interface: loopback, LAN, or internet, but you can bind it to a given network interface
-
Apr 19th, 2007, 08:15 PM
#5
Re: When is bind supposed to be used?
Like Opus said, I use it on UDP server programs. I think of it like UDP's version of Winsock.Listen (which is used for TCP).
You can use it like:
Code:
Winsock.Bind Winsock.LocalIP, PortNumberHere
-
Apr 22nd, 2007, 08:24 AM
#6
Re: When is bind supposed to be used?
Bind has more to do with reserving a port number to one socket than anything else. The secondary function is to tie a socket to one adapter.
This is all pretty well covered in the VB6 documentation.
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
|