Documentation ¶
Index ¶
- type ApplicationRequestHandlerFunction
- type RawConnection
- type RawConnectionListener
- func NewTcpConnectionListener(addr string) (RawConnectionListener, error)
- func NewWebSocketConnectionFromExistingHttpServer(httpServer *http.Server, handler *mux.Router, endpoint string, ...) (RawConnectionListener, error)
- func NewWebSocketConnectionListener(addr string, endpoint string, allowedOrigins []string) (RawConnectionListener, error)
- type StompConfig
- type StompConn
- type StompServer
- type SubscribeHandlerFunction
- type UnsubscribeHandlerFunction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RawConnection ¶
type RawConnectionListener ¶
type RawConnectionListener interface { // Blocks until a new RawConnection is established. Accept() (RawConnection, error) // Stops the connection listener. Close() error }
func NewTcpConnectionListener ¶
func NewTcpConnectionListener(addr string) (RawConnectionListener, error)
func NewWebSocketConnectionListener ¶
func NewWebSocketConnectionListener(addr string, endpoint string, allowedOrigins []string) (RawConnectionListener, error)
type StompConfig ¶
type StompConfig interface { HeartBeat() int64 AppDestinationPrefix() []string IsAppRequestDestination(destination string) bool }
func NewStompConfig ¶
func NewStompConfig(heartBeatMs int64, appDestinationPrefix []string) StompConfig
type StompConn ¶
type StompConn interface { // Return unique connection Id string GetId() string SendFrameToSubscription(f *frame.Frame, sub *subscription) Close() }
func NewStompConn ¶
func NewStompConn(rawConnection RawConnection, config StompConfig, events chan *connEvent) StompConn
type StompServer ¶
type StompServer interface { // starts the server Start() // stops the server Stop() // sends a message to a given stomp topic destination SendMessage(destination string, messageBody []byte) // sends a message to a single connection client SendMessageToClient(connectionId string, destination string, messageBody []byte) // registers a callback for stomp subscribe events OnSubscribeEvent(callback SubscribeHandlerFunction) // registers a callback for stomp unsubscribe events OnUnsubscribeEvent(callback UnsubscribeHandlerFunction) // registers a callback for application requests OnApplicationRequest(callback ApplicationRequestHandlerFunction) }
func NewStompServer ¶
func NewStompServer(listener RawConnectionListener, config StompConfig) StompServer
Click to show internal directories.
Click to hide internal directories.