[Beepcore-java-users] TLS and ECHO
Status: Beta
Brought to you by:
huston
From: noe <nej...@in...> - 2004-10-26 12:18:54
|
Is this a valid piece of code? Can I have a session secured with TLSProfile and then have a channel again with TLSProfile as in below? Or it is not meaningfull to do both? If I only choose to secure the session but not a channel everything is ok but when i try to do both(for session and channel) it gives me errors, plus if i choose to establish a channel with TLS like without a session TLS i again get errors! I am confused about this problem . I am using java version "1.4.2_06" and I have put the path for all the necessary jar files. Looks like not problem on installation and classpathing. Thanks for reading! sample code is taken from BeepCore Java example: try { session = TLSProfile.getDefaultInstance().startTLS((TCPSession) session); } catch (BEEPException e) { System.err.println("bing: Error unable to start TLS.\n\t" + e.getMessage()); if (privacy == PRIVACY_REQUIRED) return; } } // Start a channel for the echo profile Channel channel; try { //channel = session.startChannel(EchoProfile.ECHO_URI); channel = session.startChannel(TLSProfile.URI); //I added this line and it never works } catch (BEEPError e) { if (e.getCode() == 550) { System.err.println("bing: Error host does not support " + "echo profile"); // or TLS profile } |