conn

package
v0.0.0-...-0c2bc69 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Join

func Join(c1 *Conn, c2 *Conn)

Types

type Conn

type Conn struct {
	TcpConn *net.TCPConn
	Reader  *bufio.Reader
}

func (*Conn) Close

func (c *Conn) Close()

func (*Conn) ConnectServer

func (c *Conn) ConnectServer(host string, port int64) (err error)

func (*Conn) GetLocalAddr

func (c *Conn) GetLocalAddr() (addr string)

func (*Conn) GetRemoteAddr

func (c *Conn) GetRemoteAddr() (addr string)

func (*Conn) ReadLine

func (c *Conn) ReadLine() (buff string, err error)

func (*Conn) Write

func (c *Conn) Write(content string) (err error)

type Listener

type Listener struct {
	Addr  net.Addr
	Conns chan *Conn
}

func Listen

func Listen(bindAddr string, bindPort int64) (l *Listener, err error)

func (*Listener) GetConn

func (l *Listener) GetConn() (conn *Conn)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL