问题
I have following interfaces.
interface Server {
void subscribe(in Client client);
};
interface Client {
void ping();
void pong();
};
On initialization, client will connect to server and call subscribe(this). Then server will call time to time methods ping() or pong() on client. However, this will not work if client resides behind the NAT. What are possible workarounds for this problem?
Does it possible to utilize TCP connection created by client for calls server -> client? please advise.
回答1:
Find out if your ORB supports bi-directional IIOP, that solves the NAT/firewall issue for server->client callbacks.
Here are some ORBs that do support it:
OmniORB - http://omniorb.sourceforge.net/omni40/omniORB/omniORB008.html#sec:bidir
Orbix - http://documentation.progress.com/output/Iona/orbix/migration/html/InteropCx3.html
Visibroker - http://www.albany.edu/dept/csi/csi518/fall03/inprise/vbroker/doc/books/vbj/vbj45/programmers-guide/bidir.html
来源:https://stackoverflow.com/questions/14980848/how-to-implement-corba-client-behind-nat