Commit 444d54ed authored by alexstocks's avatar alexstocks

add remark for codec.go:(EventListener)OnOpen

parent cef46d37
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
--- ---
- 2016/09/07 - 2016/09/07
> 1 session.go:(Session)Close() -> session.go:(Session)clear() to be invoked by session.go:(Session)handleLoop > 1 session.go:(Session)Close() -> session.go:(Session)gc() to be invoked by session.go:(Session)handleLoop
- 2016/09/06 - 2016/09/06
> 1 codec.go:(Reader)Read(*Session, []byte) (interface{}, error) -> codec.go:(Reader)Read(*Session, []byte) (interface{}, int, error) > 1 codec.go:(Reader)Read(*Session, []byte) (interface{}, error) -> codec.go:(Reader)Read(*Session, []byte) (interface{}, int, error)
......
...@@ -36,6 +36,7 @@ type ReadWriter interface { ...@@ -36,6 +36,7 @@ type ReadWriter interface {
// EventListener is used to process pkg that recved from remote session // EventListener is used to process pkg that recved from remote session
type EventListener interface { type EventListener interface {
// invoked when session opened // invoked when session opened
// If the return error is not nil, @Session will be closed.
OnOpen(*Session) error OnOpen(*Session) error
// invoked when session closed // invoked when session closed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment