Discussion:
[omniORB] Cancelling calls in progress
garyh
2006-09-30 04:28:48 UTC
Permalink
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.

Thanks,

Gary
Duncan Grisby
2006-10-04 17:47:42 UTC
Permalink
Post by garyh
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 --
-- ***@grisby.org --
-- http://www.grisby.org --
Continue reading on narkive:
Loading...