소스 검색

Fixed some more cases where I missed the long -> int
client id conversion.


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

PSp..om 14 년 전
부모
커밋
2a33404814
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      engine/src/networking/com/jme3/network/HostedConnection.java
  2. 2 2
      engine/src/networking/com/jme3/network/base/DefaultServer.java

+ 1 - 1
engine/src/networking/com/jme3/network/HostedConnection.java

@@ -46,7 +46,7 @@ public interface HostedConnection extends MessageConnection
     /**
      *  Returns the server-unique ID for this client.
      */
-    public long getId();
+    public int getId();
     
     /**
      *  Closes and removes this connection from the server

+ 2 - 2
engine/src/networking/com/jme3/network/base/DefaultServer.java

@@ -64,7 +64,7 @@ public class DefaultServer implements Server
     private Kernel fast;
     private KernelAdapter fastAdapter;
     private Redispatch dispatcher = new Redispatch();
-    private Map<Long,HostedConnection> connections = new ConcurrentHashMap<Long,HostedConnection>();
+    private Map<Integer,HostedConnection> connections = new ConcurrentHashMap<Integer,HostedConnection>();
     private Map<Endpoint,HostedConnection> endpointConnections 
                             = new ConcurrentHashMap<Endpoint,HostedConnection>();
     
@@ -346,7 +346,7 @@ public class DefaultServer implements Server
             id = nextId.getAndIncrement();
         }
         
-        public long getId()
+        public int getId()
         {
             return id;
         }