feat 稳定300人

This commit is contained in:
2025-12-17 09:54:24 +08:00
parent 4983638c19
commit 0274262591
16 changed files with 467 additions and 234 deletions

View File

@@ -197,6 +197,10 @@ func (w *WSConn) Close() (err error) {
return w.write(make([]byte, 0), ws.OpClose)
}
func (w *WSConn) IsClose() bool {
return w.isClose
}
func (w *WSConn) write(data []byte, opCode ws.OpCode) error {
if w.isClose {
return errors.New("connection has close")