Package net.sf.cindy.encoder

Examples of net.sf.cindy.encoder.BufferEncoder


        Session session = SessionFactory.createSession(tcp ? SessionType.TCP
                : SessionType.UDP);
        session.setRemoteAddress(new InetSocketAddress(host, port));

        // set packet encoder and decoder
        session.setPacketEncoder(new BufferEncoder());
        session.setPacketDecoder(new PacketDecoder() {

            public Object decode(Session session, Packet packet)
                    throws Exception {
                Buffer content = packet.getContent();
View Full Code Here


                .parseInt(args[2]));
        System.out.println("start transfer " + file + " to " + address);

        Session session = SessionFactory.createSession(SessionType.TCP);
        session.setRemoteAddress(address);
        session.setPacketEncoder(new BufferEncoder());
        session.setSessionHandler(new FileTransferHandler(file));
        session.start();
    }
View Full Code Here

TOP

Related Classes of net.sf.cindy.encoder.BufferEncoder

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.