xmpp

package
v0.0.0-...-f1431d7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2016 License: MIT Imports: 9 Imported by: 6

Documentation

Overview

xmpp for easy communication behind firewalls.

This package is both used by the netswitch model and the Gateway server.

Index

Constants

View Source
const (
	DEBUG                    = false
	NO_TLS                   = false
	TLS_INSECURE_SKIP_VERIFY = false
	USE_SERVER_SESSION       = true
	RECONNECT_INIT_WAIT_TIME = time.Second
)
View Source
const (
	STATUS         = "xa"
	STATUS_MESSAGE = "I for one welcome our new codebot overlords."
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	Command             string
	MachineId           int64
	LocationId          int64
	UserId              int64
	IpAddress           string
	NetswitchRelayState string
	NetswitchCurrent    float64
	Raw                 string
	Error               bool
	ErrorMessage        string `json:",omitempty"`
}

type Message

type Message struct {
	Remote string
	Data   Data
}

type Xmpp

type Xmpp struct {
	// contains filtered or unexported fields
}

func NewXmpp

func NewXmpp(server, user, pass string, debugPrint func(string, ...interface{})) (x *Xmpp)

func (*Xmpp) Ping

func (x *Xmpp) Ping() error

func (*Xmpp) Recv

func (x *Xmpp) Recv() <-chan Message

func (*Xmpp) Run

func (x *Xmpp) Run()

func (*Xmpp) Send

func (x *Xmpp) Send(msg Message) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL