tcp

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: MIT Imports: 10 Imported by: 16

Documentation

Index

Constants

View Source
const (
	PROTO  = "proto"
	STATUS = "status"
	ERROR  = "error"
	OPEN   = "open"
	CLOSE  = "close"
	START  = "start"
	STOP   = "stop"
)
View Source
const (
	RANDOM  = "random"
	CURRENT = "current"
	BEGIN   = "begin"
	END     = "end"
)
View Source
const (
	PROTOCOL = "protocol"
	HOSTPORT = "hostport"
	HOSTNAME = "hostname"
)
View Source
const CLIENT = "client"
View Source
const (
	DIAL = "dial"
)
View Source
const HOST = "host"
View Source
const (
	LISTEN = "listen"
)
View Source
const (
	LOCALHOST = "localhost"
)
View Source
const PORT = "port"
View Source
const SERVER = "server"
View Source
const TCP = "tcp"

Variables

View Source
var Index = &ice.Context{Name: TCP, Help: "通信模块"}

Functions

func IsLocalHost

func IsLocalHost(m *ice.Message, ip string) bool

func ReplaceLocalhost

func ReplaceLocalhost(m *ice.Message, url string) string

Types

type Conn

type Conn struct {
	net.Conn
	// contains filtered or unexported fields
}

func (*Conn) Close

func (c *Conn) Close() error

func (*Conn) Read

func (c *Conn) Read(b []byte) (int, error)

func (*Conn) Write

func (c *Conn) Write(b []byte) (int, error)

type Listener

type Listener struct {
	net.Listener
	// contains filtered or unexported fields
}

func (Listener) Accept

func (l Listener) Accept() (net.Conn, error)

func (Listener) Close

func (l Listener) Close() error

type Stat

type Stat struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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