|
-
Sep 18th, 2006, 10:37 AM
#1
Thread Starter
Frenzied Member
[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)
-
Sep 18th, 2006, 05:18 PM
#2
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.
The most difficult part of developing a program is understanding the problem.
The second most difficult part is deciding how you're going to solve the problem.
Actually writing the program (translating your solution into some computer language) is the easiest part.
Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.
Please Help Us To Save Ana
-
Sep 19th, 2006, 04:11 AM
#3
Thread Starter
Frenzied Member
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")
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|