Internet Connection

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

Guest

hi, ive been programming in VB for about a year and a half now and i want to
start using the internet in my programs. i was wondering how i would set up a
simple program to connect to a friends computer to send text and have them
recieve and see the text? thanks
 
Do some research on the TCPClient and NetworkStream. They are what you
will need in order to create an outbound connection. To recieve the
connection on the other computer, you will need to use a TCPListener class.
 
awsome thanks...but do you kno of a that my program could figure out the IP
address of the computer its on?
 
I just looked this up:

Public Function GetIP() as Net.IPAddress
Dim h As System.Net.IPHostEntry =
System.Net.Dns.GetHostByName(System.Net.Dns.GetHostName)
Return CType(h.AddressList.GetValue(0), IPAddress)
End Function

I also believe that there is a way to do that through the
My.Computer.Network namespace in VB.Net 05...
 

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