mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 03:51:58 -08:00
Now client can start embedded Mage Server (player's feature request).
Works only for "localhost". Still can be used with external server but in such case server should be started first.
This commit is contained in:
parent
810d33c8ba
commit
a7a496af0e
23 changed files with 118 additions and 27 deletions
|
|
@ -207,8 +207,15 @@ public class Main {
|
|||
@Override
|
||||
public Object invoke(final InvocationRequest invocation) throws Throwable {
|
||||
String sessionId = invocation.getSessionId();
|
||||
InetAddress clientAddress = (InetAddress) invocation.getRequestPayload().get(Remoting.CLIENT_ADDRESS);
|
||||
SessionManager.getInstance().getSession(sessionId).setHost(clientAddress.getHostAddress());
|
||||
Map map = invocation.getRequestPayload();
|
||||
String host;
|
||||
if (map != null) {
|
||||
InetAddress clientAddress = (InetAddress) invocation.getRequestPayload().get(Remoting.CLIENT_ADDRESS);
|
||||
host = clientAddress.getHostAddress();
|
||||
} else {
|
||||
host = "localhost";
|
||||
}
|
||||
SessionManager.getInstance().getSession(sessionId).setHost(host);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue