Thread: [Beepcore-java-users] Tuning Profiles and Beepcore
Status: Beta
Brought to you by:
huston
|
From: William B. <wbe...@hm...> - 2003-03-10 09:32:45
Attachments:
tunnelfunctions.text.txt
|
Hi, For the purposes of creating a Tunnel Profile, I need to have the session perform a tuning reset while not actually changing the socket. I have used pretty much the exact code found in the two TLS profiles for the tuning reset, yet when I use Beepd and Bing (unchanged, except for the names of the profiles used), the client does not recognize the reply to it's request to start an echo profile after the the tuning reset has occurred. Can anyone give me hints as to why this is happening? The code for the startTunnel and startChannel functions are enclosed. startTunnel is used by a client to start a tunnel, startChannel is called by the session, I believe. thanks, William Berriel |
|
From: William J. M. <wm...@es...> - 2003-03-10 22:48:57
|
Are you getting the expected profiles in the greeting sent
after the tuning reste? It's possible you don't
have the profile set to be availabel in the new state...
-bill
On Mon, Mar 10, 2003 at 01:33:28AM -0800, William Berriel wrote:
> Hi,
>
> For the purposes of creating a Tunnel Profile, I need to have the
> session perform a tuning reset while not actually changing the socket. I
> have used pretty much the exact code found in the two TLS profiles for
> the tuning reset, yet when I use Beepd and Bing (unchanged, except for
> the names of the profiles used), the client does not recognize the reply
> to it's request to start an echo profile after the the tuning reset has
> occurred. Can anyone give me hints as to why this is happening?
>
> The code for the startTunnel and startChannel functions are enclosed.
> startTunnel is used by a client to start a tunnel, startChannel is
> called by the session, I believe.
>
> thanks,
>
> William Berriel
> public void startChannel(Channel channel, String encoding, String data)
> throws StartChannelException
> {
> TCPSession session = (TCPSession)channel.getSession();
> String replyData = null;
> if(data != null) {
> if(data.equalsIgnoreCase(EMPTY) || data.equalsIgnoreCase(EMPTY2)){
> replyData = OK;
> try {
> this.begin(channel, URI, replyData);
>
> // Consider the Profile Registry
> ProfileRegistry preg = session.getProfileRegistry();
> preg.removeStartChannelListener(URI);
>
> Hashtable hash = new Hashtable();
> hash.put("TUNNEL", "true");
>
> SessionTuningProperties tuning =
> new SessionTuningProperties(hash);
>
> // Cause the session to be recreated and reset
> this.complete(channel, session.getLocalCredential(),
> session.getPeerCredential(), tuning,
> preg, session.getSocket());
>
> } catch (Exception e) {
> System.err.println("We got a problem in tuning reset : " +
> e.getMessage());
>
> }
> System.out.println("tunnel made");
> }
> }
> System.err.println("Setting message listener to this");
> channel.setMessageListener(this);
>
> }
>
> public TCPSession startTunnel(TCPSession session, String data)
> throws BEEPException
> {
> // final argument is the messagelistener to handle the incoming
> // messages, change this to ourselves once our profile can handle
> // non piggy-backed messages
> Channel ch = startChannel(session, URI, false, data, null);
>
> String startData = ch.getStartData();
>
> if (startData != null){
> if(!startData.equalsIgnoreCase(OK)){
> System.err.println("We got back a bad message: " +
> startData);
> throw new BEEPException("Bad Start Data : " + startData);
> }
>
> Hashtable hash = new Hashtable();
> hash.put("TUNNEL", "true");
> SessionTuningProperties tuning=
> new SessionTuningProperties(hash);
>
> return (TCPSession) reset(session,
> session.getLocalCredential(),
> session.getPeerCredential(),
> tuning,
> session.getProfileRegistry(),
> session.getSocket());
>
>
> }
> System.err.println("Didn't get an OK! ");
> throw new BEEPException("Didn't get ok!");
> }
>
>
|
|
From: William B. <wbe...@hm...> - 2003-03-11 00:14:06
|
Yep, I'm getting those profiles sent, the client sends out a message to start the new channel, the server replies to that message with the name of the profile (as it does with Beepd and Bing using TLS or no privacy, when the nullecho actually works) and then the client does nothing with it. William Berriel William J. Mills wrote: > Are you getting the expected profiles in the greeting sent > after the tuning reste? It's possible you don't > have the profile set to be availabel in the new state... > > -bill > > On Mon, Mar 10, 2003 at 01:33:28AM -0800, William Berriel wrote: |
|
From: William J. M. <wm...@es...> - 2003-03-11 00:20:44
|
Ok, so that was my only good idea for the moment :) On Mon, Mar 10, 2003 at 04:14:53PM -0800, William Berriel wrote: > Yep, I'm getting those profiles sent, the client sends out a message to > start the new channel, the server replies to that message with the name > of the profile (as it does with Beepd and Bing using TLS or no privacy, > when the nullecho actually works) and then the client does nothing with it. > > William Berriel > > William J. Mills wrote: > > > Are you getting the expected profiles in the greeting sent > > after the tuning reste? It's possible you don't > > have the profile set to be availabel in the new state... > > > > -bill > > > > On Mon, Mar 10, 2003 at 01:33:28AM -0800, William Berriel wrote: > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Beepcore-java-users mailing list > Bee...@li... > https://lists.sourceforge.net/lists/listinfo/beepcore-java-users |
|
From: Will B. <wbe...@od...> - 2003-03-11 04:49:31
|
So I looked at some more of what was going on, the session is being terminated on the client side by a BeeepException being thrown from Channel.postFrame(), stating: Incorrect sequence number: was 306; expecting 119 This occurs (with those exact numbers) whenever I run Bing to connect to Beepd and after the Tunnel profile has been used, before the first nullecho message has been sent. thanks, William Berriel On Mon, 10 Mar 2003, William Berriel wrote: > Yep, I'm getting those profiles sent, the client sends out a message to > start the new channel, the server replies to that message with the name > of the profile (as it does with Beepd and Bing using TLS or no privacy, > when the nullecho actually works) and then the client does nothing with it. > > William Berriel > > William J. Mills wrote: > > > Are you getting the expected profiles in the greeting sent > > after the tuning reste? It's possible you don't > > have the profile set to be availabel in the new state... > > > > -bill > > > > On Mon, Mar 10, 2003 at 01:33:28AM -0800, William Berriel wrote: > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Beepcore-java-users mailing list > Bee...@li... > https://lists.sourceforge.net/lists/listinfo/beepcore-java-users > |