SkillAgentSearch skills...

Tcpsock

Package tcpsock provides easy to use interfaces for TCP I/O, including both TcpServer and TcpClient.

Install / Use

/learn @ecofast/Tcpsock
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

tcpsock

Package tcpsock provides easy to use interfaces for TCP I/O.</br></br>

How to use</br>

server:

server := tcpsock.NewTcpServer(listenPort, acceptTimeout, onConnConnect, onConnClose, onProtocol)
go server.Serve()
<-shutdown
server.Close()

client:

client := tcpsock.NewTcpClient(ServerAddr, onConnect, onClose, onProtocol)
go client.Run()
<-shutdown
client.Close()

There're more detailed demos which use custom binary protocols, like:</br>

View on GitHub
GitHub Stars17
CategoryDevelopment
Updated3y ago
Forks3

Languages

Go

Security Score

75/100

Audited on Jul 17, 2022

No findings