Help with using System.Net.Network... in VB

batcater98

New member
Joined
Mar 27, 2008
Messages
1
Programming Experience
1-3
Explanation of what I am trying to do: Working on an application that I want to be able to ping an IP address that I get from a sql table. If that address responds I then want to issue some command line commands to that IP address such as I do through an XTerm application that communicates via TCP/IP over Port 4008. Example of XTerm app would be PComm or any other ASCII based communication package.

Any ideas or help in getting started on this would be helpful, I am stuck just getting this concept off the ground.

Thanks,
Ad.
 
See this post about Ping class usage example.

For communication you can use the TcpClient, starter sample:
VB.NET:
Dim c As New Net.Sockets.TcpClient(ip, 4008)
Dim writer As New IO.StreamWriter(c.GetStream)
writer.WriteLine("command to send")
c.GetStream.Close()
c.Close()
 
Back
Top