Search in sources :

Example 6 with Client

use of com.jme3.network.Client in project jmonkeyengine by jMonkeyEngine.

the class RpcClientService method terminate.

/**
     *  Used internally to unregister the RPC MessageDelegator that
     *  was previously added to the network Client.
     */
@Override
public void terminate(ClientServiceManager serviceManager) {
    Client client = serviceManager.getClient();
    client.removeMessageListener(delegator, delegator.getMessageTypes());
}
Also used : Client(com.jme3.network.Client)

Example 7 with Client

use of com.jme3.network.Client in project jmonkeyengine by jMonkeyEngine.

the class RpcClientService method onInitialize.

/**
     *  Used internally to setup the RpcConnection and MessageDelegator.
     */
@Override
protected void onInitialize(ClientServiceManager serviceManager) {
    Client client = serviceManager.getClient();
    this.rpc = new RpcConnection(client);
    delegator = new ObjectMessageDelegator(rpc, true);
    client.addMessageListener(delegator, delegator.getMessageTypes());
}
Also used : Client(com.jme3.network.Client) ObjectMessageDelegator(com.jme3.network.util.ObjectMessageDelegator)

Example 8 with Client

use of com.jme3.network.Client in project jmonkeyengine by jMonkeyEngine.

the class ClientSerializerRegistrationsService method messageReceived.

@Override
public void messageReceived(Client source, Message m) {
    // We only wait for one kind of message...
    SerializerRegistrationsMessage msg = (SerializerRegistrationsMessage) m;
    msg.registerAll();
}
Also used : SerializerRegistrationsMessage(com.jme3.network.message.SerializerRegistrationsMessage)

Aggregations

Client (com.jme3.network.Client)3 ClientRegistrationMessage (com.jme3.network.message.ClientRegistrationMessage)2 Server (com.jme3.network.Server)1 DefaultClient (com.jme3.network.base.DefaultClient)1 TcpConnectorFactory (com.jme3.network.base.TcpConnectorFactory)1 Endpoint (com.jme3.network.kernel.Endpoint)1 SocketConnector (com.jme3.network.kernel.tcp.SocketConnector)1 UdpConnector (com.jme3.network.kernel.udp.UdpConnector)1 ChannelInfoMessage (com.jme3.network.message.ChannelInfoMessage)1 SerializerRegistrationsMessage (com.jme3.network.message.SerializerRegistrationsMessage)1 ObjectStore (com.jme3.network.rmi.ObjectStore)1 SavableSerializer (com.jme3.network.serializing.serializers.SavableSerializer)1 ObjectMessageDelegator (com.jme3.network.util.ObjectMessageDelegator)1 SessionDataDelegator (com.jme3.network.util.SessionDataDelegator)1 InetAddress (java.net.InetAddress)1