-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
吴迎松
committed
Apr 27, 2017
1 parent
05ff66a
commit 7023afa
Showing
4 changed files
with
69 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
package tcp | ||
|
||
//CallBack 是一个回调接口,用于连接的各种事件处理 | ||
type CallBack interface { | ||
//链接建立回调 | ||
OnConnected(conn *TCPConn) | ||
|
||
//消息处理回调 | ||
OnMessage(conn *TCPConn, p Packet) | ||
|
||
//链接断开回调 | ||
OnDisconnected(conn *TCPConn) | ||
//错误回调 | ||
// OnError(err error, conn *TCPConn) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters