Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUnsupportedStreamType = errors.New("Unsupported stream type.")
)
Functions ¶
func DialToDest ¶
Types ¶
type Connection ¶
func Dial ¶
func Dial(src v2net.Address, dest v2net.Destination, settings *StreamSettings) (Connection, error)
type ConnectionHandler ¶
type ConnectionHandler func(Connection)
type Dialer ¶
type Dialer func(src v2net.Address, dest v2net.Destination) (Connection, error)
type ListenFunc ¶
var ( ErrClosedConnection = errors.New("Connection already closed.") KCPListenFunc ListenFunc TCPListenFunc ListenFunc RawTCPListenFunc ListenFunc )
type Listener ¶
type Listener interface { Accept() (Connection, error) Close() error Addr() net.Addr }
type StreamConnectionType ¶
type StreamConnectionType int
var ( StreamConnectionTypeRawTCP StreamConnectionType = 1 StreamConnectionTypeTCP StreamConnectionType = 2 StreamConnectionTypeKCP StreamConnectionType = 4 )
type StreamSettings ¶
type StreamSettings struct {
Type StreamConnectionType
}
func (*StreamSettings) IsCapableOf ¶
func (this *StreamSettings) IsCapableOf(streamType StreamConnectionType) bool
Directories ¶
Path | Synopsis |
---|---|
Package kcp - A Fast and Reliable ARQ Protocol Acknowledgement: skywind3000@github for inventing the KCP protocol xtaci@github for translating to Golang
|
Package kcp - A Fast and Reliable ARQ Protocol Acknowledgement: skywind3000@github for inventing the KCP protocol xtaci@github for translating to Golang |
Click to show internal directories.
Click to hide internal directories.