mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2026-05-06 13:12:55 -07:00
Basic test component (disco Info)
This commit is contained in:
@@ -94,6 +94,13 @@ func (c *Component) ReadPacket() (Packet, error) {
|
||||
return next(c.decoder)
|
||||
}
|
||||
|
||||
func (c *Component) Send(packet string) error {
|
||||
if _, err := fmt.Fprintf(c.conn, packet); err != nil {
|
||||
return errors.New("cannot send packet " + err.Error())
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Handshake Packet
|
||||
|
||||
|
||||
Reference in New Issue
Block a user