Documentation ¶
Index ¶
- type Buffer
- type ClientTransport
- type ErrSockRead
- type RemoteAddress
- type Socket
- func (sock *Socket) Close() error
- func (sock *Socket) Dial(deadline time.Time) error
- func (sock *Socket) GetWriter() (io.WriteCloser, error)
- func (sock *Socket) IsConnected() bool
- func (sock *Socket) Read(msg *message.Message, deadline time.Time) (err wwr.ErrSockRead)
- func (sock *Socket) RemoteAddr() net.Addr
- type SocketType
- type Transport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
Buffer represents a reactive outbound buffer implementation
type ClientTransport ¶
type ClientTransport struct {
Server *Transport
}
ClientTransport implements the ClientTransport interface
func (*ClientTransport) NewSocket ¶
func (cltTrans *ClientTransport) NewSocket( dialTimeout time.Duration, ) (wwr.ClientSocket, error)
NewSocket implements the ClientTransport interface
type ErrSockRead ¶
type ErrSockRead struct {
// contains filtered or unexported fields
}
ErrSockRead implements the ErrSockRead interface
func (ErrSockRead) Error ¶
func (err ErrSockRead) Error() string
Error implements the Go error interface
func (ErrSockRead) IsCloseErr ¶
func (err ErrSockRead) IsCloseErr() bool
IsCloseErr implements the ErrSockRead interface
type RemoteAddress ¶
type RemoteAddress struct {
// contains filtered or unexported fields
}
RemoteAddress represents a net.Addr interface implementation
func (RemoteAddress) Network ¶
func (addr RemoteAddress) Network() string
Network implements the net.Addr interface
func (RemoteAddress) String ¶
func (addr RemoteAddress) String() string
String implements the net.Addr interface
type Socket ¶
type Socket struct {
// contains filtered or unexported fields
}
Socket implements the transport.Socket interface using the fasthttp/websocket library
func NewEntangledSockets ¶
NewEntangledSockets creates a new socket pair
func (*Socket) GetWriter ¶
func (sock *Socket) GetWriter() (io.WriteCloser, error)
GetWriter implements the transport.Socket interface
func (*Socket) IsConnected ¶
IsConnected implements the transport.Socket interface
func (*Socket) RemoteAddr ¶
RemoteAddr implements the transport.Socket interface
type SocketType ¶
type SocketType uint
SocketType represents the type of a socket
const ( // SocketUninitialized is the default type of an uninitialized socket SocketUninitialized SocketType = iota // SocketServer represents server-side sockets SocketServer // SocketClient represents client-side sockets SocketClient )
type Transport ¶
type Transport struct { // OnBeforeCreation is called before the creation of a new connection and // must return the options to be assigned to the new connection OnBeforeCreation func() wwr.ConnectionOptions // contains filtered or unexported fields }
Transport implements the Transport
func (*Transport) Initialize ¶
func (srv *Transport) Initialize( options wwr.ServerOptions, isShuttingdown wwr.IsShuttingDown, onNewConnection wwr.OnNewConnection, ) error
Initialize implements the Transport interface