blend

package
v0.0.0-...-fd2add7 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2016 License: Apache-2.0, Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrClash = errors.New("clash")
	ErrGone  = errors.New("gone")
	ErrOff   = errors.New("off")
)

Functions

This section is empty.

Types

type AbortMsg

type AbortMsg struct {
	Err error
}

type AcceptSession

type AcceptSession struct {
	Session
}

AcceptSession

func (*AcceptSession) Accept

func (as *AcceptSession) Accept() *Conn

type Conn

type Conn struct {
	// contains filtered or unexported fields
}

func (*Conn) Abort

func (c *Conn) Abort(reason error)

Abort closes the connection ...

func (*Conn) Close

func (c *Conn) Close() error

Close closes the connection. It is synchronized with Write and will not interrupt a concurring write.

func (*Conn) Read

func (c *Conn) Read() (interface{}, error)

Read reads the next chunk of bytes.

func (*Conn) RemoteAddr

func (c *Conn) RemoteAddr() net.Addr

func (*Conn) Write

func (c *Conn) Write(v interface{}) error

Write writes the chunk to the connection.

type ConnID

type ConnID uint32

type DialSession

type DialSession struct {
	Session
}

DialSession

func (*DialSession) Dial

func (ds *DialSession) Dial() *Conn

type Dialer

type Dialer struct {
	// contains filtered or unexported fields
}

func NewDialer

func NewDialer(frame trace.Frame, sub *codec.Transport) *Dialer

func (*Dialer) DialSession

func (d *Dialer) DialSession(addr net.Addr, scrb func()) (*DialSession, error)

type Listener

type Listener struct {
	// contains filtered or unexported fields
}

func NewListener

func NewListener(frame trace.Frame, sub *codec.Listener) *Listener

func (*Listener) AcceptSession

func (l *Listener) AcceptSession() *AcceptSession

func (*Listener) Addr

func (l *Listener) Addr() net.Addr

type Msg

type Msg struct {
	ConnID ConnID
	Demux  interface{} // PayloadMsg or AbortMsg
}

type PayloadMsg

type PayloadMsg struct {
	SeqNo   SeqNo
	Payload interface{} // User-supplied type that can be coded by the underlying codec
}

type SeqNo

type SeqNo uint32

type Session

type Session struct {
	// contains filtered or unexported fields
}

Session

func (*Session) Close

func (ssn *Session) Close() (err error)

func (*Session) NumConn

func (ssn *Session) NumConn() (numconn int, lastuse time.Time)

func (*Session) RemoteAddr

func (ssn *Session) RemoteAddr() net.Addr

func (*Session) String

func (ssn *Session) String() string

type Transport

type Transport struct {
	*Dialer
	// contains filtered or unexported fields
}

func NewTransport

func NewTransport(frame trace.Frame, sub *codec.Transport) *Transport

func (*Transport) Listen

func (t *Transport) Listen(addr net.Addr) *Listener

Jump to

Keyboard shortcuts

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