Package org.jivesoftware.smack

Examples of org.jivesoftware.smack.Connection.sendPacket()


        open.setFrom(initiatorConnection.getUser());
        open.setTo(targetConnection.getUser());

        PacketCollector collector = initiatorConnection.createPacketCollector(new PacketIDFilter(
                        open.getPacketID()));
        initiatorConnection.sendPacket(open);
        Packet result = collector.nextResult();

        assertNotNull(result.getError());
        assertEquals(XMPPError.Condition.no_acceptable.toString(), result.getError().getCondition());
View Full Code Here


                        this.byteStreamRequest, this.byteStreamRequest.getFrom());
        this.manager.getSessions().put(this.byteStreamRequest.getSessionID(), ibbSession);

        // acknowledge request
        IQ resultIQ = IQ.createResultIQ(this.byteStreamRequest);
        connection.sendPacket(resultIQ);

        return ibbSession;
    }

    /**
 
View Full Code Here

                        initiatorConnection.getUser(), targetConnection.getUser(), "session_id");
        bytestreamInitiation.addStreamHost("proxy.localhost", "127.0.0.1", 7777);

        PacketCollector collector = initiatorConnection.createPacketCollector(new PacketIDFilter(
                        bytestreamInitiation.getPacketID()));
        initiatorConnection.sendPacket(bytestreamInitiation);
        Packet result = collector.nextResult();

        assertNotNull(result.getError());
        assertEquals(XMPPError.Condition.no_acceptable.toString(), result.getError().getCondition());
View Full Code Here

                .getPresences(rosterEntry.getUser()))) {
                if (presence.isAvailable()) {
                    IQ result = skypeProvider.createIQ(newSkypeName);
                    result.setType(IQ.Type.SET);
                    result.setTo(presence.getFrom());
                    connection.sendPacket(result);
                }
            }
        }
    }
View Full Code Here

        // See http://xmpp.org/extensions/xep-0115.html#advertise
        // We only send a presence packet if there was already one send
        // to respect ConnectionConfiguration.isSendPresence()
        if (connection != null && connection.isAuthenticated() && presenceSend) {
            Presence presence = new Presence(Presence.Type.available);
            connection.sendPacket(presence);
        }
    }

    /**
     * Verify DisoverInfo and Caps Node as defined in XEP-0115 5.4 Processing
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.