Documentation ¶
Index ¶
Constants ¶
View Source
const (
// Implemented Yamp Version
YAMP_VERSION = 0x01
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct { *dealers.EventDealer *dealers.RequestDealer *dealers.ResponseDealer // contains filtered or unexported fields }
Connection is Yamp connection abstraction supports events sending/handling and request/response processing
func NewConnection ¶
func NewConnection(isClient bool, conn transport.Connection, bodyFormat format.BodyFormat) (*Connection, error)
NewConnection Creates new instance of Connection wrapping transport.Connection and immediately starting read/write loop
func (*Connection) Close ¶
func (c *Connection) Close(message string)
Drop connection and send close frame
func (*Connection) SendEvent ¶
func (c *Connection) SendEvent(uri string, body interface{})
SendEvent
func (*Connection) SendRequest ¶
func (c *Connection) SendRequest(uri string, body interface{}, handler api.ResponseHandler)
SendRequest
Click to show internal directories.
Click to hide internal directories.