Chrisz Posted November 14, 2003 Posted November 14, 2003 (edited) My program wont let me connect to anything BUT 192.*.*.* IP's or "localhost" it wont let me connect to my 'internet ip'.... Any ideas?? Btw this function below is called simply with Connect("23.236.236.23") and that ip was just.. random. :P The client code: Private Function Connect(ByVal IP As String) On Error GoTo err mobjClient = New TcpClient(IP, 15200) DisplayText("Connected to host" & vbCrLf) mobjClient.GetStream.BeginRead(marData, 0, 1024, AddressOf DoRead, Nothing) Send("New client online") Connect = 1 Exit Function err: Connect = 0 End Function The server code: Private Sub DoListen() Try mobjListener = New TcpListener(15200) mobjListener.Start() Do 'Dim x As New Client(mobjListener.AcceptSocket) Dim x As New Client(mobjListener.AcceptTcpClient) AddHandler x.Connected, AddressOf OnConnected AddHandler x.Disconnected, AddressOf OnDisconnected 'AddHandler x.CharsReceived, AddressOf OnCharsReceived AddHandler x.LineReceived, AddressOf OnLineReceived mcolClients.Add(x.ID, x) Dim params() As Object = {"New connection"} Me.Invoke(New StatusInvoker(AddressOf Me.UpdateStatus), params) Loop Until False Catch End Try End Sub Everything works.. apart from connecting outside my local network. That is connecting to other peoples computers running the server.... Yes they all have the .net framework and such. Edited November 14, 2003 by Chrisz Quote
Administrators PlausiblyDamp Posted November 14, 2003 Administrators Posted November 14, 2003 What is the localhost's IP address? Can you access computers on the internet with other applications IE, ftp etc? Also if you drop to a command propmpt and type ipconfig /all do you have entries for the default gateway? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Chrisz Posted November 14, 2003 Author Posted November 14, 2003 I'm not sure about FTP, since my webhost is down.. and as for the ipconfig stuff.. i have a one default gateway entry and the rest are blank o.o Quote
Administrators PlausiblyDamp Posted November 14, 2003 Administrators Posted November 14, 2003 Can you ping the host you are trying to connect to? Do you know if there is a firewall between you and the other hosts? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Administrators PlausiblyDamp Posted November 14, 2003 Administrators Posted November 14, 2003 (edited) Where is the computer located - at home / work / school etc? Also do you know if there are any .Net security policies in place on that PC. Have a look under Administrative Tools, .Net configuration. Edited May 4, 2007 by PlausiblyDamp Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Chrisz Posted November 14, 2003 Author Posted November 14, 2003 At home, and im at the .net config thing, but im not sure what you want to know. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.