Documentation ¶
Index ¶
- Constants
- func ParseMessageType(s string) (byte, error)
- type ActionCableServerAdapter
- type Benchmark
- type BinaryServerAdapter
- type Client
- type ClientPool
- type Config
- type LocalClientPool
- type Payload
- type PhoenixServerAdapter
- type RemoteClientPool
- type ResultRecorder
- type ServerAdapter
- type StandardServerAdapter
- type TextResultRecorder
- type Worker
- type WorkerConnectMsg
- type WorkerErrorMsg
- type WorkerMsg
- type WorkerRTTResultMsg
- type WorkerRxBroadcastCountMsg
Constants ¶
View Source
const ( ClientEchoCmd = iota ClientBroadcastCmd )
View Source
const ( MsgServerEcho = 'e' MsgServerBroadcast = 'b' MsgServerBroadcastResult = 'r' MsgClientEcho = 'e' MsgClientBroadcast = 'b' )
Variables ¶
This section is empty.
Functions ¶
func ParseMessageType ¶
Types ¶
type ActionCableServerAdapter ¶
type ActionCableServerAdapter struct {
// contains filtered or unexported fields
}
func (*ActionCableServerAdapter) Receive ¶
func (acsa *ActionCableServerAdapter) Receive() (*serverSentMsg, error)
func (*ActionCableServerAdapter) SendBroadcast ¶
func (acsa *ActionCableServerAdapter) SendBroadcast(payload *Payload) error
func (*ActionCableServerAdapter) SendEcho ¶
func (acsa *ActionCableServerAdapter) SendEcho(payload *Payload) error
func (*ActionCableServerAdapter) Startup ¶
func (acsa *ActionCableServerAdapter) Startup() error
type BinaryServerAdapter ¶
type BinaryServerAdapter struct {
// contains filtered or unexported fields
}
func (*BinaryServerAdapter) Receive ¶
func (bsa *BinaryServerAdapter) Receive() (*serverSentMsg, error)
func (*BinaryServerAdapter) SendBroadcast ¶
func (bsa *BinaryServerAdapter) SendBroadcast(payload *Payload) error
func (*BinaryServerAdapter) SendEcho ¶
func (bsa *BinaryServerAdapter) SendEcho(payload *Payload) error
type ClientPool ¶
type LocalClientPool ¶
type LocalClientPool struct {
// contains filtered or unexported fields
}
func NewLocalClientPool ¶
func NewLocalClientPool(laddr *net.TCPAddr) *LocalClientPool
func (*LocalClientPool) Close ¶
func (lcp *LocalClientPool) Close() error
type PhoenixServerAdapter ¶
type PhoenixServerAdapter struct {
// contains filtered or unexported fields
}
func (*PhoenixServerAdapter) Receive ¶
func (psa *PhoenixServerAdapter) Receive() (*serverSentMsg, error)
func (*PhoenixServerAdapter) SendBroadcast ¶
func (psa *PhoenixServerAdapter) SendBroadcast(payload *Payload) error
func (*PhoenixServerAdapter) SendEcho ¶
func (psa *PhoenixServerAdapter) SendEcho(payload *Payload) error
func (*PhoenixServerAdapter) Startup ¶
func (psa *PhoenixServerAdapter) Startup() error
type RemoteClientPool ¶
type RemoteClientPool struct {
// contains filtered or unexported fields
}
func NewRemoteClientPool ¶
func NewRemoteClientPool(addr string) (*RemoteClientPool, error)
func (*RemoteClientPool) Close ¶
func (rcp *RemoteClientPool) Close() error
type ResultRecorder ¶
type ServerAdapter ¶
type StandardServerAdapter ¶
type StandardServerAdapter struct {
// contains filtered or unexported fields
}
func (*StandardServerAdapter) Receive ¶
func (ssa *StandardServerAdapter) Receive() (*serverSentMsg, error)
func (*StandardServerAdapter) SendBroadcast ¶
func (ssa *StandardServerAdapter) SendBroadcast(payload *Payload) error
func (*StandardServerAdapter) SendEcho ¶
func (ssa *StandardServerAdapter) SendEcho(payload *Payload) error
type TextResultRecorder ¶
type TextResultRecorder struct {
// contains filtered or unexported fields
}
func NewTextResultRecorder ¶
func NewTextResultRecorder(w io.Writer) *TextResultRecorder
type WorkerConnectMsg ¶
type WorkerErrorMsg ¶
type WorkerErrorMsg struct {
Msg string
}
type WorkerMsg ¶
type WorkerMsg struct { ClientID int `json:"clientID"` Type string `json:"type"` Connect *WorkerConnectMsg `json:"connect,omitempty"` RTTResult *WorkerRTTResultMsg `json:"rttResult,omitempty"` Error *WorkerErrorMsg `json:"error,omitempty"` RxBroadcastCount *WorkerRxBroadcastCountMsg `json:"rxBroadcastCount,omitempty"` }
type WorkerRTTResultMsg ¶
type WorkerRxBroadcastCountMsg ¶
type WorkerRxBroadcastCountMsg struct {
Count int
}
Click to show internal directories.
Click to hide internal directories.