[RESOLVED] VB.Net Whats an IPAddress(ip,port) supposed to look like?
The underlined code is causing a build error. basically it looks like it expects the ip to be in a different format.
Any help please.
VB Code:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
[U] Me.Connect( 82.47.247.163, "Fish paste")[/U]
End Sub
Shared Sub Connect(ByVal ip As IPAddress, ByVal message As String)
Try
' Create a TcpClient.
' Note, for this client to work you need to have a TcpServer
' connected to the same address as specified by the server, port
' combination.
Dim port As Int32 = 9100
Dim client As New TcpClient
client.Connect(ip, port)
Re: VB.Net Whats an IPAddress(ip,port) supposed to look like?
I don't know what the particular code is expecting, but I'd expect that it wants either a string, Me.Connect( "82.47.247.163", "Fish paste"), or a longint (you'd have to convert the dotted form to the long form).
Try putting the cursor on IPAddress in the sub declaration and hitting F1 to see what help says an IP address looks like.
Re: VB.Net Whats an IPAddress(ip,port) supposed to look like?
Through the F1 method I found this which is obsolete apparently but works.
VB Code:
Dim ip As IPAddress = IPAddress.Parse("82.47.247.163")
Me.Connect(ip, "Fish paste")