eahydra / swnet Goto Github PK
View Code? Open in Web Editor NEWa simple network framework write by golang
a simple network framework write by golang
开发环境:云主机具备公共IP:2.2.2.2(假设)
1.建立server时,address使用localhost:9999,此时使用客户端连接2.2.2.2:9999时连接失败;
1.建立server时,address使用2.2.2.2:9999,此时使用客户端连接2.2.2.2:9999时连接成功;
请问这是go标准库net的机制么,可否详细解释一下,多谢
benchmark过吗
// Session is a tcp connection wrapper. It recved data in silence, and
// queue data to send.
type Session struct {
closed int32
conn net.Conn
reader _bufio.Reader
_sendChan chan interface{}*
stopedChan chan struct{}
closeCallback func(_Session)
sendCallback func(_Session, interface{})
packetHandler PacketHandler
packetProtocol PacketProtocol
}
建议import采用绝对路径
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.