Documentation ¶
Index ¶
- Constants
- func ParseAddress(conn io.Reader, network string) (*common.Address, error)
- func ParsePort(addr net.Addr) (uint16, error)
- func WriteAddress(w io.Writer, request *Request) error
- type Command
- type ConnSession
- type HasHash
- type NeedAuth
- type NeedConfig
- type NeedMeter
- type NeedRespond
- type PacketReadWriter
- type PacketReader
- type PacketSession
- type PacketWriter
- type Request
Constants ¶
View Source
const ( MaxUDPPacketSize = 1024 * 4 UDPTimeout = time.Second * 5 TCPTimeout = time.Second * 5 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConnSession ¶
type ConnSession interface { io.ReadWriteCloser }
type NeedAuth ¶ added in v0.0.3
type NeedAuth interface {
SetAuth(auth stat.Authenticator)
}
type NeedConfig ¶
type NeedConfig interface {
SetConfig(config *conf.GlobalConfig)
}
type NeedMeter ¶ added in v0.0.3
type NeedMeter interface {
SetMeter(meter stat.TrafficMeter)
}
type NeedRespond ¶
type NeedRespond interface {
Respond() error
}
type PacketReadWriter ¶
type PacketReadWriter interface { PacketReader PacketWriter }
type PacketReader ¶
type PacketSession ¶
type PacketSession interface { PacketReadWriter io.Closer }
type PacketWriter ¶
Click to show internal directories.
Click to hide internal directories.