[omniORB] Cancelling calls in progress

Duncan Grisby duncan at grisby.org
Wed Oct 4 13:47:49 BST 2006


On Friday 29 September, "garyh" wrote:

> I'm using omniorb 4.0.7 and I'm trying to figure out whether it's
> possible to close a call to the server. Right now I have a function
> that downloads files from the server. It works great except I can't
> figure out how to stop it from another thread if the user decides to
> abort. There must be some way of doing this besides having to download
> a little piece at a time. The files aren't that big (~1mb) but some of
> the clients can only connect at 5k/s.
> 
> So is there some function I'm missing that does this? Is there some
> code I can add to disconnect the tcp socket? I don't really care if I
> have to disconnect all calls in progress although I'd prefer to keep
> the object references.  Searching the archive I can find this question
> a few times but it's never been answered.

There's no way to do it, I'm afraid. The GIOP protocol has a
CancelRequest message, but there's no way to send one and close a
connection. It doesn't particularly fit well with CORBA's semantics --
how would you even identify a call in progress to be able to kill it?
The normal solution to this kind of situation is, as you say, to do the
transfer in small pieces.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list