This commit is contained in:
crusader 2017-11-29 23:56:36 +09:00
parent 6440d89d72
commit 868080cba5
2 changed files with 14 additions and 3 deletions

View File

@ -8,9 +8,9 @@ type SocketContext interface {
cuc.Context cuc.Context
} }
func newSocketContext() SocketContext { func newSocketContext(parent cuc.Context) SocketContext {
sCTX := &socketContext{} sCTX := &socketContext{}
sCTX.Context = cuc.NewContext(nil) sCTX.Context = cuc.NewContext(parent)
return sCTX return sCTX
} }

View File

@ -1,8 +1,19 @@
package client package client
import "time" import (
"net/http"
"net/url"
"time"
cuc "git.loafle.net/commons_go/util/context"
)
type SocketHandler interface { type SocketHandler interface {
SocketContext(parent cuc.Context) SocketContext
GetURL() *url.URL
GetRequestHeader() http.Header
GetMaxMessageSize() int64 GetMaxMessageSize() int64
GetWriteTimeout() time.Duration GetWriteTimeout() time.Duration
GetReadTimeout() time.Duration GetReadTimeout() time.Duration