Skip to content

Commit

Permalink
新增接口
Browse files Browse the repository at this point in the history
  • Loading branch information
guonaihong committed Jul 30, 2024
1 parent 1135b16 commit 85bf220
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions api/api.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package api

import (
"time"

"github.com/antlabs/wsutil/opcode"
)

// WebSocket Writer的缩写
type WsWriter interface {
//WriteCloseTimeout(sc StatusCode, t time.Duration) (err error)
WriteControl(op opcode.Opcode, data []byte) (err error)
WriteMessage(op opcode.Opcode, writeBuf []byte) (err error)
WritePing(data []byte) (err error)
WritePong(data []byte) (err error)
WriteTimeout(op opcode.Opcode, data []byte, t time.Duration) (err error)
}

0 comments on commit 85bf220

Please sign in to comment.