This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: InetAddress.getLocalHost()


> Why not have the server listen on a known port for "register subscriber /
> deregister subscriber" operations. When a client registers its interest in a
> subscription, the server can then retrieve the remote address of the client via
> getInetAddress() of the client socket obtained via ServerSocket.accept().
> If you're worried about the remote IP address changing because of DHCP and all you
> need is a unique identifier, you can have the client generate and remember a UUID:

Ok. I didn't know about such possibilities.

I'll put the stuff somewhere on the internet as soon as possible.

Feel free to return to me a version that works better than this initial one (which
only works a bit; that's all to it); or patches, or anything that is better
thought through than what I did (not really difficult):

erik@linuxpresario binlin32 $ ./queueservant
queue servant version 0.7
Copyright (C) 2003 Erik Poupaert, erik.poupaert@chello.be
This application contains portions of org.apache.xmlrpc
All rights reserved.
Redistribution allowed under the conditions stated in the GPL.
Any other form of redistribution is strictly prohibited.
This software comes with ABSOLUTELY NO WARRANTY.
 
queue servant accepts xml rpc requests and saves them to a queue.
Usage:
   queueservant -xmlrpcport <xmlrpcport>
                -queuedir <dir>
   queueservant --version
   queueservant --help


erik@linuxpresario binlin32 $ ./queueclient
queue client version 0.7
Copyright (C) 2003 Erik Poupaert, erik.poupaert@chello.be
This application contains portions of org.apache.xmlrpc
All rights reserved.
Redistribution allowed under the conditions stated in the GPL.
Any other form of redistribution is strictly prohibited.
This software comes with ABSOLUTELY NO WARRANTY.
 
queue client reads xmlrpc requests from a queue and forwards them.
Usage:
   queueclient  -xmlrpcport <xmlrpcport>
                -queuedir <dir>
                [-xmlrpcserver <servername>|-registerport <port>]
                [-storedir <dir>]
                [-duplicatedir <dir>]
                [-logdir <dir>]
                [-interval-millis <millis>]
   queueclient  --version
   queueclient  --help
Note:
  If neither -xmlrpcserver nor -registerport is used, messages are sent back
  to the original sender. If -xmlrpcserver is used, messages are sent to this
  particular server. If -registerport is used, messages are sent to the machines 
that register on this port. -xmlrpcserver and -registerport cannot be used together.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]