![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
It is working for me (.net v1.1). Do you have a firewall blocking it, or VPN connections etc? // The Server: public class Class1 { public Class1() { try { System.Console.WriteLine("Starting the server on port 12345"); java.net.ServerSocket servSock = new java.net.ServerSocket( 12345, 50, null ); servSock.accept(); System.Console.WriteLine( "->" + servSock.getLocalPort() ); |
|
System.Console.WriteLine("Ending the server"); } catch ( Exception e ) { e.printStackTrace(); } } /** @attribute System.STAThread() */ public static void main(String[] args) { new Class1(); } } // The Client |
#3
| |||
| |||
|
|
More info please. This is still working: // SERVER public class Class1 { public Class1() { try { java.net.ServerSocket s = new java.net.ServerSocket( 12345 ); java.net.Socket ss = s.accept(); System.Console.WriteLine( ss.getLocalAddress() ); System.Console.WriteLine( ss.getLocalAddress().getLocalHost() ); } catch ( Exception e ) { e.printStackTrace(); } } /** @attribute System.STAThread() */ public static void main(String[] args) { new Class1(); } } Client: c:...\bin\Debug>telnet localhost 12345 Server output: c:...\bin\Debug>J_SocketBug.exe xxxxxx.xxx-xxx.net/193.9x.xx.xx Regards, Lars-Inge Tønnessen |
#4
| |||
| |||
|
|
More info please. This is still working: // SERVER public class Class1 { public Class1() { try { java.net.ServerSocket s = new java.net.ServerSocket( 12345 ); java.net.Socket ss = s.accept(); System.Console.WriteLine( ss.getLocalAddress() ); System.Console.WriteLine( ss.getLocalAddress().getLocalHost() ); } catch ( Exception e ) { e.printStackTrace(); } } /** @attribute System.STAThread() */ public static void main(String[] args) { new Class1(); } } Client: c:...\bin\Debug>telnet localhost 12345 Server output: c:...\bin\Debug>J_SocketBug.exe xxxxxx.xxx-xxx.net/193.9x.xx.xx Regards, Lars-Inge Tønnessen |
#5
| |||
| |||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |