Imports System.Net Namespace Network Friend Class Socket Friend Function GetHostByName(addr As String) As String ' this method returns the host ' when you give an addr Return CalculateHostByName(addr) End Function Friend Sub Listen() ' do the listen on a port ' and whatever it is needed ' to listen End Sub Friend Function Recv(buffer As Byte()) As Integer System.IO.Read(buffer) End Function End Class Friend Class ClientSocket Friend Function Send(buffer As Byte()) As Integer System.IO.Write(buffer) End Function Friend Sub ConnectTo(addr As String) ' connect to a client Net.ConnectTo(addr) End Sub End Class End Namespace