Archived

This forum has been archived. Please start a new discussion on GitHub.

I have a problem.

ICE whether has a method to indentify which client invoke server interface, but not by client parameter.

Comments

  • hi,

    your client can send additional information to the server by using
    the Context.
    I use this for sending user authentication from client to the server.

    code sample:



    Ice.Context _context = new Ice.Context();
    _context.Add( "username", user );

    proxy.DoSomthing( ...., _context );


    you can also assign the context to the proxy, so the proxy always uses
    th defined context:


    SomeProxyPrx proxy_with_context =
    SomeProxyPrx .uncheckedCast( proxy.ice_newContext( _context ) );



    I hope this helps!


    cu tom
  • Thanks!

    Thank for your directions