yamp

package module
v0.0.0-...-309e9be Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2017 License: MIT Imports: 9 Imported by: 0

README

yamp-go Build Status GoDoc

yamp-go is implementation of yamp protocol in Go.

Status: under development. May contain critical bugs, not suitable for production usage.

Current Features

  • Events
  • Request / Responses. No request cancelling and no progressive responses.
  • Client and Server mode. No handshake support.
  • JSON serializer

Usage Example

See connection_test.go

License

MIT. See LICENSE file for more details.

Author

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL