Package net.sf.cindy

Examples of net.sf.cindy.SessionAcceptorHandler


        sslc = params.contains("-secure") ? getSSLcontext() : null;

        SessionAcceptor acceptor = SessionFactory
                .createSessionAcceptor(SessionType.TCP);
        acceptor.setListenPort(port);
        acceptor.setAcceptorHandler(new SessionAcceptorHandler() {

            public void exceptionCaught(SessionAcceptor acceptor,
                    Throwable cause) {
                System.err.println(cause);
            }
View Full Code Here


    }

    public static void main(String[] args) throws IOException {
        SessionAcceptor acceptor = SessionFactory
                .createSessionAcceptor(SessionType.TCP);
        acceptor.setAcceptorHandler(new SessionAcceptorHandler() {

            public void exceptionCaught(SessionAcceptor acceptor,
                    Throwable cause) {
                cause.printStackTrace();
            }
View Full Code Here

    }

    public static void main(String[] args) throws Exception {
        SessionAcceptor acceptor = SessionFactory
                .createSessionAcceptor(SessionType.TCP);
        acceptor.setAcceptorHandler(new SessionAcceptorHandler() {

            public void sessionAccepted(SessionAcceptor acceptor,
                    Session session) throws Exception {
                session.setPacketDecoder(new ChatMessageDecoder());
                session.setPacketEncoder(new ChatMessageEncoder());
View Full Code Here

TOP

Related Classes of net.sf.cindy.SessionAcceptorHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.