Advertisement

02.07.2008 at 12:18PM PST, ID: 23145712
[x]
Attachment Details

why I can't connect to my socket server remotely

Asked by eugie17 in SSH / Telnet Software, Programming Languages, .Net Editors & IDEs

Tags:

I am writing a VB.Net socket server program that begines like in the code
the code work great for local connections (when I use localhost) and it does send the expected reply when i test with telnet

however when I try to connect from any remote computer it fails like this

C:\Documents and Settings\Eugene>telnet 10.13.3.35 11000
Connecting To 10.13.3.35...Could not open connection to the host, on port 11000:
 Connect failed

dear EE can you explain whats wrong?
Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
Dim lipa As IPHostEntry = Dns.GetHostEntry("127.0.0.1")
        Dim lep As New IPEndPoint(lipa.AddressList(0), 11000)
 
        Dim s As New Socket(lep.Address.AddressFamily, SocketType.Stream, ProtocolType.Tcp)
        Try
            s.Bind(lep)
            s.Listen(1000)
 
            While True
                allDone.Reset()
 
                'Console.WriteLine("Waiting for a connection...")
 
                s.BeginAccept(New AsyncCallback(AddressOf Listen_Callback), s)
 
                allDone.WaitOne()
            End While
        Catch ex As Exception
            Console.WriteLine(ex.ToString())
        End Try
 
Loading Advertisement...
 
[+][-]02.07.2008 at 12:45PM PST, ID: 20844951

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: SSH / Telnet Software, Programming Languages, .Net Editors & IDEs
Tags: vb.net
Sign Up Now!
Solution Provided By: PeturIngiEgilsson
Participating Experts: 1
Solution Grade: B
 
 
[+][-]02.07.2008 at 10:16PM PST, ID: 20848210

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.14.2008 at 10:12AM PDT, ID: 21566407

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628