Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/jeffallen/mqtt
/ functions
Functions
65 in github.com/jeffallen/mqtt
⨍
Functions
65
◇
Types & classes
14
↓ 23 callers
Method
String
()
mqtt.go:469
↓ 13 callers
Method
submit
Queue a message; no notification of sending is done.
mqtt.go:459
↓ 6 callers
Method
Connect
Connect sends the CONNECT message to the server. If the ClientId is not already set, use a default (a 63-bit decimal random number). The "clean sessio
mqtt.go:818
↓ 6 callers
Method
Disconnect
Disconnect sends a DISCONNECT message to the server. This function blocks until the disconnect message is actually sent, and the connection is closed.
mqtt.go:855
↓ 6 callers
Method
Publish
Publish publishes the given message to the MQTT server. The QosLevel of the message must be QosAtLeastOnce for now.
mqtt.go:880
↓ 6 callers
Method
Subscribe
Subscribe subscribes this connection to a list of topics. Messages will be delivered on the Incoming channel.
mqtt.go:868
↓ 5 callers
Function
statsMessage
(topic string, stat int64)
mqtt.go:48
↓ 4 callers
Function
isWildcard
(topic string)
mqtt.go:686
↓ 3 callers
Method
WritePayload
(w io.Writer)
mqtt.go:89
↓ 3 callers
Method
add
Add this connection to the map, or find out that an existing connection already exists for the same client-id.
mqtt.go:436
↓ 3 callers
Function
connect
()
pingtest/main.go:198
↓ 3 callers
Method
sync
sync sends a message and blocks until it was actually sent.
mqtt.go:889
↓ 2 callers
Method
Start
Start makes the Server start accepting and handling connections.
mqtt.go:371
↓ 2 callers
Function
connect
(who string)
loadtest/main.go:117
↓ 2 callers
Function
header
header is used to initialize a proto.Header when the zero value is not correct. The zero value of proto.Header is the equivalent of header(dupFalse, p
mqtt.go:670
↓ 2 callers
Method
matches
(parts []string)
mqtt.go:174
↓ 2 callers
Function
newWild
(topic string, c *incomingConn)
mqtt.go:170
↓ 2 callers
Method
nextid
()
mqtt.go:860
↓ 2 callers
Method
valid
()
mqtt.go:693
↓ 1 callers
Method
Size
()
mqtt.go:93
↓ 1 callers
Method
add
(sample time.Duration)
pingtest/main.go:34
↓ 1 callers
Method
calculate
()
pingtest/main.go:41
↓ 1 callers
Function
client
(i int)
many/main.go:57
↓ 1 callers
Method
clientConnect
()
mqtt.go:45
↓ 1 callers
Method
clientDisconnect
()
mqtt.go:46
↓ 1 callers
Method
del
Delete a connection; the connection must be closed by the caller first.
mqtt.go:451
↓ 1 callers
Method
messageRecv
()
mqtt.go:43
↓ 1 callers
Method
messageSend
()
mqtt.go:44
↓ 1 callers
Method
newIncomingConn
newIncomingConn creates a new incomingConn associated with this server. The connection becomes the property of the incomingConn and should not be touc
mqtt.go:406
↓ 1 callers
Function
newIntPayload
(i int64)
mqtt.go:82
↓ 1 callers
Function
newSubscriptions
(workers int)
mqtt.go:122
↓ 1 callers
Function
ping
(i int)
pingtest/main.go:111
↓ 1 callers
Function
pub
(i int)
loadtest/main.go:86
↓ 1 callers
Method
publish
(sub *subscriptions, interval time.Duration)
mqtt.go:56
↓ 1 callers
Function
readCert
See http://mosquitto.org/man/mosquitto-tls-7.html for how to make the server.{crt,key} files. Then use mosquitto like this to talk to it: mosquitto_s
smqttsrv/main.go:17
↓ 1 callers
Method
reader
()
mqtt.go:481
↓ 1 callers
Method
reader
()
mqtt.go:740
↓ 1 callers
Method
run
The subscription processing worker.
mqtt.go:270
↓ 1 callers
Method
sendRetain
(topic string, c *incomingConn)
mqtt.go:135
↓ 1 callers
Method
start
Start reading and writing on this connection.
mqtt.go:429
↓ 1 callers
Function
sub
(i int, wg *sync.WaitGroup)
loadtest/main.go:143
↓ 1 callers
Method
submitSync
Queue a message, returns a channel that will be readable when the message is sent.
mqtt.go:475
↓ 1 callers
Method
subscribers
Find all connections that are subscribed to this topic.
mqtt.go:204
↓ 1 callers
Method
unsub
Remove the subscription to topic for a given connection.
mqtt.go:246
↓ 1 callers
Method
unsubAll
Remove all subscriptions that refer to a connection.
mqtt.go:223
↓ 1 callers
Method
wait
Wait for the receipt to indicate that the job is done.
mqtt.go:418
↓ 1 callers
Method
writer
()
mqtt.go:622
↓ 1 callers
Method
writer
()
mqtt.go:785
↓ 1 callers
Function
wsub
()
pingtest/main.go:221
Function
NewClientConn
NewClientConn allocates a new ClientConn.
mqtt.go:725
Function
NewServer
NewServer creates a new MQTT server, which accepts connections from the given listener. When the server is stopped (for instance by another goroutine
mqtt.go:344
Method
ReadPayload
(r io.Reader)
mqtt.go:85
Function
TestWild
(t *testing.T)
wild_test.go:8
Method
add
(topic string, c *incomingConn)
mqtt.go:152
Function
init
()
mqtt.go:25
Function
init
()
loadtest/main.go:110
Function
main
()
pingtest/main.go:55
Function
main
()
sub/main.go:19
Function
main
()
loadtest/main.go:25
Function
main
()
mqttsrv/main.go:13
Function
main
()
pub/main.go:20
Function
main
()
many/main.go:26
Function
main
()
ticktock/main.go:22
Function
main
()
smqttsrv/main.go:25
Method
submit
(c *incomingConn, m *proto.Publish)
mqtt.go:319