Documentation ¶
Overview ¶
Package socket provides a pseudo socket
Index ¶
- type Pool
- type Socket
- func (s *Socket) Accept(m *transport.Message) error
- func (s *Socket) Close() error
- func (s *Socket) Local() string
- func (s *Socket) Process(m *transport.Message) error
- func (s *Socket) Recv(m *transport.Message) error
- func (s *Socket) Remote() string
- func (s *Socket) Send(m *transport.Message) error
- func (s *Socket) SetLocal(l string)
- func (s *Socket) SetRemote(r string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Socket ¶
type Socket struct {
// contains filtered or unexported fields
}
Socket is our pseudo socket for transport.Socket
func New ¶
New returns a new pseudo socket which can be used in the place of a transport socket. Messages are sent to the socket via Accept and receives from the socket via Process. SetLocal/SetRemote should be called before using the socket.
func (*Socket) Accept ¶
Accept passes a message to the socket which will be processed by the call to Recv
func (*Socket) Process ¶
Process takes the next message off the send queue created by a call to Send
Click to show internal directories.
Click to hide internal directories.