Documentation ¶
Index ¶
- Constants
- Variables
- func Dial(proto string, remoteAddr string) (net.Conn, error)
- func GetLocalAddr(remoteAddr string) (net.Addr, error)
- func Init(interfaceName string)
- func Listen(proto, addr string) (net.Listener, error)
- type Addr
- type Conn
- func (conn *Conn) Close() error
- func (conn *Conn) CloseRequest() (err error)
- func (conn *Conn) CloseResponse() (err error)
- func (conn *Conn) IsTimeout() bool
- func (conn *Conn) LocalAddr() net.Addr
- func (conn *Conn) Read(b []byte) (n int, err error)
- func (conn *Conn) ReadWithHeader(b []byte) (n int, err error)
- func (conn *Conn) RemoteAddr() net.Addr
- func (conn *Conn) SetDeadline(t time.Time) error
- func (conn *Conn) SetReadDeadline(t time.Time) error
- func (conn *Conn) SetWriteDeadline(t time.Time) error
- func (conn *Conn) UpdateTime()
- func (conn *Conn) Write(b []byte) (n int, err error)
- func (conn *Conn) WriteWithHeader(b []byte) (n int, err error)
- type Listener
- type PTCP
- type Raw
Constants ¶
View Source
const ( CONNECTING = iota CONNECTED CLOSING CLOSED )
View Source
const ( RETRYTIME = 5 RETRYINTERVAL = 500 )
Variables ¶
View Source
var BUFFERSIZE = 65535
View Source
var CHANBUFFERSIZE = 1024
View Source
var CONNCHANBUFSIZE = 1024
View Source
var CONNTIMEOUT = 60
View Source
var LISTENERBUFSIZE = 1024
View Source
var RAWBUFSIZE = 65535
Functions ¶
Types ¶
type Conn ¶
type Conn struct { InputChan chan string OutputChan chan string State int LastUpdate time.Time // contains filtered or unexported fields }
func (*Conn) CloseRequest ¶
func (*Conn) CloseResponse ¶
func (*Conn) RemoteAddr ¶
func (*Conn) UpdateTime ¶
func (conn *Conn) UpdateTime()
type Listener ¶
type Listener struct { Address string InputChan chan string OutputChan chan string // contains filtered or unexported fields }
func NewListener ¶
type PTCP ¶
type PTCP struct {
// contains filtered or unexported fields
}
func (*PTCP) CleanTimeoutConns ¶
func (p *PTCP) CleanTimeoutConns()
func (*PTCP) CloseListener ¶
func (*PTCP) CreateConn ¶
func (*PTCP) CreateListener ¶
Click to show internal directories.
Click to hide internal directories.