obtaining client IP address

can this be done in servoy ?

i want to store the ip addres from where the client is running (the client-side ip adress)

thx

currently not possible.
You want the ip of the network that is being used to start the client i take. (if there is more then one network card..)

Hi,

Created a plugin that should give you the IP address of the Client. I’m not able now to test myself, since currently I have only one machine for both the Server and the Clients, so could you test if this plugin gives you the correct IP Address?

If it works, I’ll brush up the plugin (add sample code etc…) and release it.

Paul

pbakker:
Hi,

Created a plugin that should give you the IP address of the Client. I’m not able now to test myself, since currently I have only one machine for both the Server and the Clients, so could you test if this plugin gives you the correct IP Address?

If it works, I’ll brush up the plugin (add sample code etc…) and release it.

Paul

I tested it on a Lan and it seems to work fine. Nice job :slight_smile:

Cool :D

Somewhere this week I’ll brush it up and release it. If more of these kind of functions are needed, let me know and I’ll see what I can do.

Paul

pbakker:
Cool :D

Somewhere this week I’ll brush it up and release it. If more of these kind of functions are needed, let me know and I’ll see what I can do.

Paul

Sending a message to another client? :D

:D

That would be a nice one, but quite in a different category then getting the IP address of the client…

But I’ll see if I can figure out if at all possible through plugin’s and if possible, if I have sufficient knowledge of Java to implement it.

Paul

if you want to do this then you have to dig a bit in RMI of java

make a serverside plugin (see mail plugin) and a bit of clientcode.
In the client code make a RMI object of the client and register this on the serverside where you keep a map of all the clients

then if one client wants to send a messege it can ask for a list and send to all or send to one (that real sending should be done on the server)

The problem is to unregister clients whoe are loggout out ect!

So, if I understand correctly:

Create a serverside/clientside plugin combo

Let a user register itself on the server, meaning: for example when the user logs in, add him to the list of logged in users on the Serverside.

When the user wants to send a message: request the list of logged in users, let him select 1 or more logged in users

And then send a message to the selected user, again through the serverside of the plugin.

Is this what you mean?

If so, then i have the following Q’s:

  • How do I send the actual message and what info do I need to store in the list (probably an answer on Q1 answers Q2…)

Paul

Liking the challenge…

in the list you have a RMI object that has a method like:

client.sendMessage(String)

when called it will call the remote object on the client where you show that message somehow.
so the object that you have to register on the server must be rmi objects.