Results 1 to 3 of 3

Thread: how to close connection manually in ice?

  1. #1
    ldr123 is offline Registered User
    Name: Li Dongri
    Organization: ownperson
    Project: information monitor
    Join Date
    Mar 2009
    Location
    China
    Posts
    7

    how to close connection manually in ice?

    I'm studying ICE recently. Now I have some questions.
    If I want to close a connection between Server and Client, I can use the config file to set it.(For example, If I set Ice.ACM.Server = n or Ice.ACM.Client = n), the connection will be automatically closed by the server or client after they have been idle for n seconds.But now, I want to close connection manually(The code like "m_Conn->Close()"), How do it?Please give me some suggestions to resolve it. thanks a lot.

    Best Regards
    Li Dongri

  2. #2
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    You can call ice_getConnection(), or ice_getCachedConnection(). That returns an Ice::Connection object (see slice/Ice/Connection.ice). That can then be closed by calling close(true), or close(false) on the connection object. There should be more documentation on this in the Ice manual.

  3. #3
    ldr123 is offline Registered User
    Name: Li Dongri
    Organization: ownperson
    Project: information monitor
    Join Date
    Mar 2009
    Location
    China
    Posts
    7
    Quote Originally Posted by matthew View Post
    You can call ice_getConnection(), or ice_getCachedConnection(). That returns an Ice::Connection object (see slice/Ice/Connection.ice). That can then be closed by calling close(true), or close(false) on the connection object. There should be more documentation on this in the Ice manual.
    ----
    Hi matthew
    Thanks for you reply, i will try it.

    Best regards.
    Li dongri

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 07-21-2010, 07:32 AM
  2. Replies: 1
    Last Post: 04-15-2009, 05:06 PM
  3. Can't close ssl connection?
    By liurunfeng in forum Help Center
    Replies: 16
    Last Post: 05-22-2007, 12:10 AM
  4. Is ICE compatible with openssl?
    By hero107 in forum Help Center
    Replies: 1
    Last Post: 04-04-2006, 03:44 AM
  5. start icepacknode manually
    By zhuxiaofeng in forum Help Center
    Replies: 2
    Last Post: 10-06-2004, 07:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •