Socket Connection

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi im a newbie here, can anyone help me with this simple problem. Any help
would be appreciated so much..

My Problem:

I want to create a socket (not tcp but socket) that connects to a server. I
have many IP addresses on my pc and i want to choose 1 and use it to connect
to the server and port i specified. I already have made the choosing of IP
and the problem is that i dont know how to use the chosen IP to connect to
the server and port. I think the default gets any IP thats in your pc and use
it to connect to the server...

Can anyone help me with this? Thank you so so much!
 
Hello, Rain!

R> My Problem:

R> I want to create a socket (not tcp but socket) that connects to a
R> server.

Socket has to be of some type anyway...

R> I have many IP addresses on my pc and i want to choose 1 and use it to
R> connect to the server and port i specified. I already have made the
R> choosing of IP and the problem is that i dont know how to use the chosen
R> IP to connect to the server and port. I think the default gets any IP
R> thats in your pc and use it to connect to the server...

To select local address that will be used to intiate connection you can
use Socket.Bind(...) method on local socket.

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top