Refactor Application to Application & AppContext

This commit is contained in:
Jae Kwon
2015-11-29 14:22:30 -08:00
parent 8b9df7d685
commit 5d994944c6
5 changed files with 175 additions and 61 deletions

View File

@ -2,6 +2,12 @@ package types
type Application interface {
// For new socket connections
Open() AppContext
}
type AppContext interface {
// Echo a message
Echo(message string) string
@ -28,4 +34,7 @@ type Application interface {
// Remove event listener
RemListener(key string) RetCode
// Close this AppContext
Close() error
}