transport

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2015 License: BSD-3-Clause Imports: 13 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conn

type Conn struct {
	Peer [32]byte
	// contains filtered or unexported fields
}

func NewClient

func NewClient(conn io.ReadWriteCloser, myIdentity, myIdentityPublic, serverPublic *[32]byte) *Conn

func NewServer

func NewServer(conn io.ReadWriteCloser, identity *[32]byte) *Conn

func (*Conn) Close

func (c *Conn) Close() (err error)

func (*Conn) Handshake

func (c *Conn) Handshake() error

func (*Conn) Read

func (c *Conn) Read(out []byte) (n int, err error)

func (*Conn) ReadProto

func (c *Conn) ReadProto(out proto.Message) error

func (*Conn) SetDeadline

func (c *Conn) SetDeadline(t time.Time)

func (*Conn) WaitForClose

func (c *Conn) WaitForClose() error

func (*Conn) Write

func (c *Conn) Write(buf []byte) (n int, err error)

func (*Conn) WriteProto

func (c *Conn) WriteProto(msg proto.Message) error

Jump to

Keyboard shortcuts

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