tcp

package
v0.0.0-...-95a312b Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TCPServer

func TCPServer(listener net.Listener, handler TCPHandler)

首先是监听端口,当有请求到来时开启一个goroutine去处理该链接请求

Types

type TCPHandler

type TCPHandler interface {
	Handle(net.Conn)
}

TCP长连接的处理只需要实现Handle即可

Jump to

Keyboard shortcuts

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