Re: [Beepcore-java-users] building a channel listener on client and open a channel on server side
Status: Beta
Brought to you by:
huston
|
From: William J. M. <wm...@ol...> - 2002-08-15 17:55:17
|
Russel,
Sounds like you are having some luck, cool!
You need to register the prfile in the "client" or connecting peer, and
it needs to be registered as a listener. If you are watching the connection
with ethereal (a sniffer) or testing the "client" it needs to have a
populated <greeting> instead of just an empty <greeting></greeting>.
The code in the connecting peer will look a lot like the server code.
Does this help?
-bill
On Thu, Aug 15, 2002 at 10:10:52AM -0700, Russell Hung wrote:
> Hi,
>
> I am trying to build a channel from server to client (server ---->
> client) so the server could send the messages actively.
>
> I have successfully built a channel from client to server (client ---->
> server) using -
> on server side:
>
> startChannelListener = profile.init(uri, profileConfiguration);
> profileRegistry.addStartChannelListener(uri, startChannelListener,
> sessionTuningProperties);
>
> and client side:
>
> // builds a session using "AutomatedTCPSessionCreator.initiate(...)"
>
> channel = session.startChannel(EchoProfile.EchoProfile_URI);
>
> After that (there is already a channel "client ---> server"), I try to
> build a channel from server to client ("server -----> client") so the
> server could actively send messages to client using the same algorithm -
> on client side:
>
> startChannelListener = profile.init(uri, profileConfiguration);
> profileRegistry.addStartChannelListener(uri, startChannelListener,
> sessionTuningProperties);
>
> and server side:
>
> // after the server agree with client's session request, it obtains
> a session.
> session = AutomatedTCPSessionCreator.listen(listenPort,
> profileRegistry);
> channel = session.startChannel(EchoProfile.EchoProfile_URI);
>
> It returns the error messages below after the server side tries to start
> a channel:
>
> "org.beepcore.beep.core.BEEPError: all requested profiles are
> unsupported"
>
> Is building a channel from server to client feasible? Or maybe I did
> something wrong! Thanks.
>
>
> Russell Hung
> rh...@vi...
>
|