Documentation ¶
Index ¶
- Constants
- type IncomingSocket
- func (i IncomingSocket) GetDownwardNexusList() []nexusHelper.Nexus
- func (i *IncomingSocket) InitiateClose()
- func (i IncomingSocket) IsEqual(n nexusHelper.Nexus) bool
- func (i *IncomingSocket) Name() string
- func (i *IncomingSocket) OnBinMessage(belowNexus nexusHelper.Nexus, msg []byte)
- func (i *IncomingSocket) OnClose(wasClean bool, code int, reason string)
- func (i IncomingSocket) OnConnect(r *http.Request)
- func (i IncomingSocket) OnConnecting(r *http.Request)
- func (i *IncomingSocket) OnMessage(belowNexus nexusHelper.Nexus, moneysocketMessage base2.MoneysocketMessage)
- func (i *IncomingSocket) OnOpen()
- func (i *IncomingSocket) OnWsMessage(payload []byte, isBinary bool)
- func (i *IncomingSocket) Send(msg base2.MoneysocketMessage) error
- func (i *IncomingSocket) SendBin(rawMsg []byte) error
- func (i *IncomingSocket) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (i *IncomingSocket) SetOnBinMessage(messageBinFunc nexusHelper.OnBinMessage)
- func (i *IncomingSocket) SetOnMessage(messageFunc nexusHelper.OnMessage)
- func (i *IncomingSocket) SharedSeed() *beacon.SharedSeed
- func (i IncomingSocket) UUID() uuid.UUID
- type OutgoingSocket
- func (i *OutgoingSocket) GetDownwardNexusList() []nexusHelper.Nexus
- func (i *OutgoingSocket) InitiateClose()
- func (i *OutgoingSocket) IsEqual(n nexusHelper.Nexus) bool
- func (i *OutgoingSocket) Name() string
- func (i *OutgoingSocket) OnBinMessage(belowNexus nexusHelper.Nexus, msg []byte)
- func (i *OutgoingSocket) OnClose(wasClean bool, code int, reason string)
- func (i OutgoingSocket) OnConnect(conn *websocket.Conn, r *http.Response)
- func (i OutgoingSocket) OnConnecting()
- func (i *OutgoingSocket) OnMessage(belowNexus nexusHelper.Nexus, msg moneysocket_message.MoneysocketMessage)
- func (i *OutgoingSocket) OnOpen()
- func (i *OutgoingSocket) OnWsMessage(payload []byte, isBinary bool)
- func (i *OutgoingSocket) Send(msg moneysocket_message.MoneysocketMessage) error
- func (i *OutgoingSocket) SendBin(msg []byte) error
- func (i *OutgoingSocket) SetOnBinMessage(messageBinFunc nexusHelper.OnBinMessage)
- func (i *OutgoingSocket) SetOnMessage(messageFunc nexusHelper.OnMessage)
- func (i *OutgoingSocket) SharedSeed() *beacon.SharedSeed
- func (i *OutgoingSocket) UUID() uuid.UUID
- type WebsocketNexus
Constants ¶
View Source
const IncomingSocketName = "IncomingSocketName"
View Source
const OutgoingSocketName = "OutgoingSocket"
View Source
const WebsocketNexusName = "WebsocketNexus"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IncomingSocket ¶
type IncomingSocket struct { ws_server.WebSocketServerProtocol // protocol layer coorespond to the socket interface FactoryMsProtocolLayer layer.Layer // contains filtered or unexported fields }
func NewIncomingSocket ¶
func NewIncomingSocket() *IncomingSocket
create a new incoming websocket nexus (accepts request)
func (IncomingSocket) GetDownwardNexusList ¶ added in v0.12.0
func (i IncomingSocket) GetDownwardNexusList() []nexusHelper.Nexus
func (*IncomingSocket) InitiateClose ¶
func (i *IncomingSocket) InitiateClose()
func (IncomingSocket) IsEqual ¶ added in v0.12.0
func (i IncomingSocket) IsEqual(n nexusHelper.Nexus) bool
func (*IncomingSocket) Name ¶ added in v0.12.0
func (i *IncomingSocket) Name() string
func (*IncomingSocket) OnBinMessage ¶
func (i *IncomingSocket) OnBinMessage(belowNexus nexusHelper.Nexus, msg []byte)
cooresponds to the nexus interface, handles a binary message
func (*IncomingSocket) OnClose ¶
func (i *IncomingSocket) OnClose(wasClean bool, code int, reason string)
func (IncomingSocket) OnConnect ¶
func (i IncomingSocket) OnConnect(r *http.Request)
func (IncomingSocket) OnConnecting ¶
func (i IncomingSocket) OnConnecting(r *http.Request)
func (*IncomingSocket) OnMessage ¶
func (i *IncomingSocket) OnMessage(belowNexus nexusHelper.Nexus, moneysocketMessage base2.MoneysocketMessage)
cooresponds to the nexus interface, handles a message
func (*IncomingSocket) OnOpen ¶
func (i *IncomingSocket) OnOpen()
func (*IncomingSocket) OnWsMessage ¶
func (i *IncomingSocket) OnWsMessage(payload []byte, isBinary bool)
func (*IncomingSocket) Send ¶
func (i *IncomingSocket) Send(msg base2.MoneysocketMessage) error
func (*IncomingSocket) SendBin ¶
func (i *IncomingSocket) SendBin(rawMsg []byte) error
func (*IncomingSocket) ServeHTTP ¶
func (i *IncomingSocket) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*IncomingSocket) SetOnBinMessage ¶ added in v0.12.0
func (i *IncomingSocket) SetOnBinMessage(messageBinFunc nexusHelper.OnBinMessage)
func (*IncomingSocket) SetOnMessage ¶ added in v0.12.0
func (i *IncomingSocket) SetOnMessage(messageFunc nexusHelper.OnMessage)
func (*IncomingSocket) SharedSeed ¶
func (i *IncomingSocket) SharedSeed() *beacon.SharedSeed
func (IncomingSocket) UUID ¶ added in v0.53.0
func (i IncomingSocket) UUID() uuid.UUID
type OutgoingSocket ¶
type OutgoingSocket struct { ws_client.WebsocketClientProtocol // protocol layer coorespond to the socket interface FactoryMsProtocolLayer layer.Layer OutgoingSharedSeed *beacon.SharedSeed // contains filtered or unexported fields }
func NewOutgoingSocket ¶
func NewOutgoingSocket() *OutgoingSocket
create a new incoming websocket nexus (accepts request)
func (*OutgoingSocket) GetDownwardNexusList ¶ added in v0.13.0
func (i *OutgoingSocket) GetDownwardNexusList() []nexusHelper.Nexus
func (*OutgoingSocket) InitiateClose ¶ added in v0.13.0
func (i *OutgoingSocket) InitiateClose()
func (*OutgoingSocket) IsEqual ¶ added in v0.13.0
func (i *OutgoingSocket) IsEqual(n nexusHelper.Nexus) bool
func (*OutgoingSocket) Name ¶ added in v0.13.0
func (i *OutgoingSocket) Name() string
func (*OutgoingSocket) OnBinMessage ¶
func (i *OutgoingSocket) OnBinMessage(belowNexus nexusHelper.Nexus, msg []byte)
cooresponds to the nexus interface, handles a binary message
func (*OutgoingSocket) OnClose ¶
func (i *OutgoingSocket) OnClose(wasClean bool, code int, reason string)
func (OutgoingSocket) OnConnect ¶
func (i OutgoingSocket) OnConnect(conn *websocket.Conn, r *http.Response)
func (OutgoingSocket) OnConnecting ¶
func (i OutgoingSocket) OnConnecting()
func (*OutgoingSocket) OnMessage ¶
func (i *OutgoingSocket) OnMessage(belowNexus nexusHelper.Nexus, msg moneysocket_message.MoneysocketMessage)
cooresponds to the nexus interface, handles a message
func (*OutgoingSocket) OnOpen ¶
func (i *OutgoingSocket) OnOpen()
func (*OutgoingSocket) OnWsMessage ¶
func (i *OutgoingSocket) OnWsMessage(payload []byte, isBinary bool)
func (*OutgoingSocket) Send ¶
func (i *OutgoingSocket) Send(msg moneysocket_message.MoneysocketMessage) error
func (*OutgoingSocket) SendBin ¶
func (i *OutgoingSocket) SendBin(msg []byte) error
func (*OutgoingSocket) SetOnBinMessage ¶ added in v0.13.0
func (i *OutgoingSocket) SetOnBinMessage(messageBinFunc nexusHelper.OnBinMessage)
func (*OutgoingSocket) SetOnMessage ¶ added in v0.13.0
func (i *OutgoingSocket) SetOnMessage(messageFunc nexusHelper.OnMessage)
func (*OutgoingSocket) SharedSeed ¶
func (i *OutgoingSocket) SharedSeed() *beacon.SharedSeed
func (*OutgoingSocket) UUID ¶ added in v0.53.0
func (i *OutgoingSocket) UUID() uuid.UUID
type WebsocketNexus ¶
func NewWebsocketNexus ¶
func NewWebsocketNexus(belowNexus nexus.Nexus, layer layer.Layer) *WebsocketNexus
func (*WebsocketNexus) OnBinMessage ¶
func (o *WebsocketNexus) OnBinMessage(belowNexus nexus.Nexus, msgByte []byte)
func (*WebsocketNexus) OnMessage ¶
func (o *WebsocketNexus) OnMessage(belowNexus nexus.Nexus, msg base2.MoneysocketMessage)
Click to show internal directories.
Click to hide internal directories.