Documentation ¶
Index ¶
- Constants
- type ConnectCheckHeaderHandle
- type NotifyHandler
- type StompServer
- func (stompS *StompServer) AddConnectCheckHandle(handler ConnectCheckHeaderHandle)
- func (stompS *StompServer) AddSubscription(destination, subscriptionId string, session *melody.Session)
- func (stompS *StompServer) Command(session *melody.Session, msg []byte) error
- func (stompS *StompServer) NotifyAllSession(contentType string, body []byte)
- func (stompS *StompServer) SendError(subscriptionId string, body []byte) error
- func (stompS *StompServer) SendMessage(destination, contentType string, body []byte)
- func (stompS *StompServer) SendMessageByRegex(regex, contentType string, body []byte)
- func (stompS *StompServer) SendMessageWithCheck(destination, contentType string, body []byte, ...) error
- func (stompS *StompServer) UnSubscription(subscriptionId string)
Constants ¶
View Source
const ( SubscriptionIdKey = "subscriptionId" ContentTypeJson = "application/json" ContentTypeText = "text/plain" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NotifyHandler ¶
type StompServer ¶
type StompServer struct {
// contains filtered or unexported fields
}
func NewStomp ¶
func NewStomp() *StompServer
func (*StompServer) AddConnectCheckHandle ¶
func (stompS *StompServer) AddConnectCheckHandle(handler ConnectCheckHeaderHandle)
func (*StompServer) AddSubscription ¶
func (stompS *StompServer) AddSubscription(destination, subscriptionId string, session *melody.Session)
func (*StompServer) Command ¶
func (stompS *StompServer) Command(session *melody.Session, msg []byte) error
func (*StompServer) NotifyAllSession ¶
func (stompS *StompServer) NotifyAllSession(contentType string, body []byte)
func (*StompServer) SendError ¶
func (stompS *StompServer) SendError(subscriptionId string, body []byte) error
func (*StompServer) SendMessage ¶
func (stompS *StompServer) SendMessage(destination, contentType string, body []byte)
func (*StompServer) SendMessageByRegex ¶
func (stompS *StompServer) SendMessageByRegex(regex, contentType string, body []byte)
func (*StompServer) SendMessageWithCheck ¶
func (*StompServer) UnSubscription ¶
func (stompS *StompServer) UnSubscription(subscriptionId string)
Click to show internal directories.
Click to hide internal directories.