Documentation ¶
Overview ¶
Package websockets handles websocket messages and provides a simple websockets server.
Index ¶
- func NotificationBlockHandler(hub *Hub, client *rpcclient.Client, blockID string)
- func NotificationMempoolHandler(hub *Hub, client *rpcclient.Client, txID string)
- func ServeWs(hub *Hub, w http.ResponseWriter, r *http.Request, rpcClient *rpcclient.Client)
- type BroadcastAddressMessage
- type BroadcastTransactionMessage
- type Client
- type Hub
- type RegisterAddress
- type RegisterBloom
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NotificationBlockHandler ¶
NotificationBlockHandler used to notify blocks
func NotificationMempoolHandler ¶
NotificationMempoolHandler used to notify mempool blocks
Types ¶
type BroadcastAddressMessage ¶
type BroadcastAddressMessage struct {
// contains filtered or unexported fields
}
BroadcastAddressMessage used to receive message of addresses
type BroadcastTransactionMessage ¶
type BroadcastTransactionMessage struct {
// contains filtered or unexported fields
}
BroadcastTransactionMessage is used to receive messages of transactions
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a middleman between the websocket connection and the hub.
type Hub ¶
type Hub struct {
// contains filtered or unexported fields
}
Hub maintains the set of active clients and broadcasts messages to the clients.
type RegisterAddress ¶
type RegisterAddress struct {
// contains filtered or unexported fields
}
RegisterAddress is a channel used to register an address to a websocket client
type RegisterBloom ¶
type RegisterBloom struct {
// contains filtered or unexported fields
}
RegisterBloom is a channel message used to register a bloom filter
Click to show internal directories.
Click to hide internal directories.