[omniORB] "Permanent Connections with Omni..."
Duncan Grisby
dgrisby@uk.research.att.com
Wed, 08 Dec 1999 14:43:41 +0000
On Wednesday 8 December, Andrew Weaver wrote:
> So far, I can imagine that I could use the naming service to locate my
> "provider". Thereafter, I want to establish connection and request something
> similar to a download. The circuit must remain open until I decide that I am
> finished with it because the "download" may well consist of more than one
> block of transfer.
I'm not certain what you want to do, but there are two possible ways
you can use omniORB to do block transfers. The first is to stay
completely within the bounds of CORBA, and define an interface like
interface Provider {
exception NoMoreData {};
typedef sequence <octet> data;
data getNextBlock() raises (NoMoreData);
};
Alternatively, you could do it the other way around, where the
provider pushes data to an object on the consumer. In this situation,
omniORB opens a TCP connection when you do the first invocation, then
caches it. Future invocations use the same connection, unless you
leave it idle for too long.
The second solution is to use CORBA to mediate access through another
transport, like plain TCP:
interface Provider {
void openConnection(string host, unsigned short port);
};
Does that answer your question?
Duncan.
--
-- Duncan Grisby \ Research Engineer --
-- AT&T Laboratories Cambridge --
-- http://www.uk.research.att.com/~dpg1 --