Get the connection id from a recieved Message

Hello,

i am a little bit confused. I can get connection-ids of the clients in the server-class, but how do I know which Message came from which connection? In other words, is there a way to define the connection-id in the Server-Listener?

The listener is given the actual connection as the “source” parameter. Not sure why you would need the ID also. But if for some strange and possibly backwards reason you really do need the client ID, then it’s http://javadoc.jmonkeyengine.org/com/jme3/network/HostedConnection.html#getId()

Source Parameter - I guess you mean the HostedConnection?
MessageListener<HostedConnection>

So I have to put the Connection into the constructor of ServerListener?
SL = new ServerListener(Connection);

That would mean, that the Listener reacts only to one connection. Is there a way to notify the Server about incoming Messages? E.g. if I want to broadcast recieved Messages to other Clients.

What is “ServerListener”? I think there is something fundamental you are missing… could be javadoc.