|
|
||
|---|---|---|
| Readme.md | ||
| go.mod | ||
| go.sum | ||
| wsstomp.go | ||
Readme.md
Real stomp - websocket impl stomp library in go
How to use?
go get "git.sis.ski/moxitech/realstomp-go" If error: use $ export GOPRIVATE=git.sis.ski Example of create connection:
// Stomper interface defines the basic methods
type Stomper interface {
Send(topic string, id int, data []byte) error
}
// StompClient implements the Stomper interface
type StompClient struct {
conn *stomp.Conn
state bool
brokerURL string
waitMessages map[string]*time.Timer
mutex sync.Mutex
}
// make client from StompClient and invoke connect method