|
-
Jun 6th, 2000, 12:06 AM
#1
Thread Starter
New Member
Please, why I can't issue a connect after a bind, using winsock component from VB6 sp3?
There is any workaround for this behavior?
-
Jun 6th, 2000, 01:16 AM
#2
Hyperactive Member
Why are you attempting to bind then connect?
What does bind do?
Bind tells the computer, usually a server, hey, I(the socket) am associated with this port.
What is associcated with bind?
Listen. After binding a socket to a port, you call the listen method, which tells the server, that this socket is listening for incoming data on this port.
So you see bind is associated with listening, if you wish to connect a bind is not needed, only when you are listening. If you are creating a server, then connect is now being called, but rather connection requested, because your socket has received a connect request (with its bind and listen).
-
Jun 6th, 2000, 01:33 AM
#3
Thread Starter
New Member
I am just trying to select the local IP address (not port number) to use in a connection.
My machine already has an IP address (used as local address by Winsock component). But, I established a RAS connection (at this moment, my machine has 2 IP address), and I want to connect using the new IP (associated to the RAS connection).
To do that, I need to "bind" the socket to use this IP.
When I do this, the Winsock component does not allow a "connect" action using this socket.
Originally posted by billrogers
Why are you attempting to bind then connect?
What does bind do?
Bind tells the computer, usually a server, hey, I(the socket) am associated with this port.
What is associcated with bind?
Listen. After binding a socket to a port, you call the listen method, which tells the server, that this socket is listening for incoming data on this port.
So you see bind is associated with listening, if you wish to connect a bind is not needed, only when you are listening. If you are creating a server, then connect is now being called, but rather connection requested, because your socket has received a connect request (with its bind and listen).
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
|