Browse Source

Made the UDP port constant separate from TCP to allow
for more interesting testing with fewer code changes.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7108 75d07b2b-3a1a-0410-a2c5-0572b91ccdca

PSp..om 14 years ago
parent
commit
5439dbc2a9

+ 1 - 1
engine/src/test/jme3test/network/TestChatClient.java

@@ -98,7 +98,7 @@ public class TestChatClient extends JFrame
         getContentPane().add( p, "South" );
         
         client = Network.connectToServer( TestChatServer.NAME, TestChatServer.VERSION,
-                                          host, TestChatServer.PORT );                                          
+                                          host, TestChatServer.PORT, TestChatServer.UDP_PORT );                                          
         client.addMessageListener( new ChatHandler(), ChatMessage.class );                                             
         client.start();                                                                               
     }

+ 2 - 1
engine/src/test/jme3test/network/TestChatServer.java

@@ -57,6 +57,7 @@ public class TestChatServer
     public static final int VERSION = 1;
 
     public static final int PORT = 5110;
+    public static final int UDP_PORT = 5110;
 
     public static void initializeClasses()
     {
@@ -70,7 +71,7 @@ public class TestChatServer
         initializeClasses();
     
         // Use this to test the client/server name version check
-        Server server = Network.createServer( NAME, VERSION, PORT, PORT );
+        Server server = Network.createServer( NAME, VERSION, PORT, UDP_PORT );
         server.start();
 
         ChatHandler handler = new ChatHandler();