Documentation
¶
Index ¶
- type Connection
- type NetConnection
- func (c *NetConnection) Close() error
- func (c *NetConnection) Printf(format string, args ...interface{}) error
- func (c *NetConnection) ReadCommand(timeout int) (command, args string, err error)
- func (c *NetConnection) ReadDotBytes(timeout int) ([]byte, error)
- func (c *NetConnection) RemoteAddr() net.Addr
- func (c *NetConnection) Reply(code int, messages ...string) error
- func (c *NetConnection) StartTLS(cfg *tls.Config)
- func (c *NetConnection) Tarpit() (int, time.Duration, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection interface { Printf(format string, args ...interface{}) error Reply(code int, messages ...string) error StartTLS(*tls.Config) ReadCommand(timeout int) (command, args string, err error) ReadDotBytes(timeout int) ([]byte, error) Close() error RemoteAddr() net.Addr Tarpit() (int, time.Duration, error) }
func NewConnection ¶
func NewConnection(conn net.Conn) Connection
type NetConnection ¶
type NetConnection struct {
// contains filtered or unexported fields
}
func (*NetConnection) Close ¶
func (c *NetConnection) Close() error
func (*NetConnection) Printf ¶
func (c *NetConnection) Printf(format string, args ...interface{}) error
func (*NetConnection) ReadCommand ¶
func (c *NetConnection) ReadCommand(timeout int) (command, args string, err error)
func (*NetConnection) ReadDotBytes ¶
func (c *NetConnection) ReadDotBytes(timeout int) ([]byte, error)
func (*NetConnection) RemoteAddr ¶
func (c *NetConnection) RemoteAddr() net.Addr
func (*NetConnection) StartTLS ¶
func (c *NetConnection) StartTLS(cfg *tls.Config)
Click to show internal directories.
Click to hide internal directories.