Re: building a channel listener on client and open a channel on server side

"William J. Mills" <[email protected]> Thu, 15 Aug 2002 12:55:13 -0500
Newsgroups gmane.network.beep.beepcore.java.general
Message-ID <[email protected]>
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
> [email protected]
> 




-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390