Documentation ¶
Index ¶
- Variables
- func Connect(conn net.Conn, host string, port uint16) (net.Conn, error)
- func GenDefaultHtml(remoteAddrStr string) string
- func GenDefaultHttpHeader(contentLength int) string
- func GenDefaultHttpResponse(remoteAddrStr string) string
- type Client
- type Conn
- func (c *Conn) Close() error
- func (c *Conn) LocalAddr() net.Addr
- func (c *Conn) Read(b []byte) (n int, err error)
- func (c *Conn) RemoteAddr() net.Addr
- func (c *Conn) SetDeadline(t time.Time) error
- func (c *Conn) SetReadDeadline(t time.Time) error
- func (c *Conn) SetWriteDeadline(t time.Time) error
- func (c *Conn) Write(b []byte) (n int, err error)
- type Response
- type Server
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrConnClosed = errors.New("connection closed")
ErrConnClosed is an error about closed
Functions ¶
func GenDefaultHtml ¶ added in v1.0.3
func GenDefaultHttpHeader ¶ added in v1.0.3
func GenDefaultHttpResponse ¶ added in v1.0.3
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn implement net.Conn
func (*Conn) RemoteAddr ¶
RemoteAddr is used to get remote address
func (*Conn) SetDeadline ¶
SetDeadline is used to set read and write deadline
func (*Conn) SetReadDeadline ¶
SetReadDeadline is used to set read deadline
func (*Conn) SetWriteDeadline ¶
SetWriteDeadline is used to set write deadline
Click to show internal directories.
Click to hide internal directories.