Let me try to explain better, my english is very bad >.>

Im working with telemetry in a energy company, so we use gprs modems 
connected to digital metters to know the consumption of energy, billing, 
turn off and on energy in places and so...

We have two softwares to do this, the "X" take care of the comunication 
(the one im making) and the "Y" send and take the right comands to do 
the job (this server use the one im making to send and get the data).

All the modems connect to a ip and port, inside the server every modem 
should have a ip and port so the second software can operate with him.

This can be configurable sending SMS or if the modem is connecting using 
GPRS (im gonna use this to do the load balancing making some part of the 
modems connect on another server if the primary is overloaded)

When the software i make start, i create the port 10000 and get all the 
ports  of all modems on database and create them too, so everyport is 
listening to new connections.

The port 10000 get the connections of the modems and the other ports get 
the connections of the "Y" software.

What i need is, when the server "Y" connect to a specific port and send 
a command, this command should be delivered to the rigth modem trough 
the port 10000, and when i get the result from the modem send it back to 
the application.

The comunication always start from the application, never from the 
modem. (at least till now... hehe)

The modems are configurable to stay connected forever, if the connection 
drops, it try to connect again.


I think now its clear :)
-- 
Posted via http://www.ruby-forum.com/.