Home Help Center

Multi networks

alfredtalfredt Member Alfred TasconOrganization: NoneProject: None
Is there a way to make the Object adapter sit on a particular network ?

ie the machine has 192.168.1.x and 192.168.3.x as its networks.
192.168.3.x is used for internet traffic and I want all ICE traffic to happen on the 192.168.2.x network.


Thanks
Alfred

Comments

  • alfredtalfredt Member Alfred TasconOrganization: NoneProject: None
    sorry that should be 192.168.1.x not 192.168.2.x
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Alfred,

    You just need to specify the IP address in the object adapter endpoints. There's 2 ways to specify the object adapter endpoints depending on how you create it:
    • Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("MyAdapter", "tcp -h 192.168.1.1 -p 12345 ");
    • Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("MyAdapter"); and specify the "MyAdapter.Endpoints=tcp -h 192.168.1.1 -p 12345" configuration property in a configuration file or on the command line.

    Benoit.
  • alfredtalfredt Member Alfred TasconOrganization: NoneProject: None
    I managed to get it to work on a C++ ICE server but not on a Java server.
    Should this be the case?
    Or has someone else got it to work with ICEJ ?

    Thanks

    Alfred
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    It should also work with a Java server. Are you getting any error message? Can you send us a small example that demonstrate the problem?

    Also, you can enable network tracing with the Ice.Trace.Network property (set it to 1), this might give you some clues.

    Benoit.
Sign In or Register to comment.