powered by Jive Software

Rendez Vous Server.... in WildFire... how to know client real IP port?

Hi,

I have just create a WildFire PlugIn that allow clients to discover their “REAL” IP address (that can be different from local address like 192.168… behind a wireless router by example).

In my plug in I use this line to discover the Host Address :

address = XMPPServer.getInstance().getSessionManager().getSession(packet.getFrom()).getCo nnection().getInetAddress()…getHostAddress();

But how can I get the PORT number ?

If I m behind a router… it is necessary for me to know the port number of the client…

Does someone can help me ?

Thanks

I have find a solution… but I have MODIFIED THE WildFire source code for this.

So… I would like to contact the WildFire team to do a small request for the next versions of the server.

I explain my solution :


I have modified the “SocketConnection” class and now the “socket” variable is public.

Like this, I can write :

SocketConnection connection = (SocketConnection)XMPPServer.getInstance().getSessionManager().getSession(packe t.getFrom()).getConnection();

port = connection.socket.getPort();

PLEASE TELL ME HOW TO ASK THIS FEATURE FOR NEXT VERSIONS ???

Hi,

you may wait until Matt or Derek read this or send an IM or email to Gato, he’'s the Wifi Project Leader.

It would help a lot if you could explain your use case to him, making arbitrary private variables public is usually not a good coding style but sometimes the easiest solution.

LG

I filed this as JM-623 and am implementing it now.

Regards,

Matt

Thanks a lot