ing
This commit is contained in:
parent
032f2604e5
commit
b19cb58c3e
|
@ -171,7 +171,7 @@ func NewSocket(sb SocketBuilder, parentContext cuc.Context) (Socket, error) {
|
|||
url := sb.GetURL()
|
||||
reqHeader := sb.GetRequestHeader()
|
||||
|
||||
conn, res, err := d.Dial(url.String(), reqHeader)
|
||||
conn, res, err := d.Dial(url, reqHeader)
|
||||
if nil != err {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ type SocketBuilder interface {
|
|||
SocketContext(parent cuc.Context) SocketContext
|
||||
SocketHandler() SocketHandler
|
||||
|
||||
GetURL() *url.URL
|
||||
GetURL() string
|
||||
GetRequestCookie() http.CookieJar
|
||||
GetRequestHeader() http.Header
|
||||
GetSubProtocols() []string
|
||||
|
|
|
@ -13,7 +13,7 @@ import (
|
|||
)
|
||||
|
||||
type SocketBuilders struct {
|
||||
URL *url.URL
|
||||
URL string
|
||||
RequestCookie http.CookieJar
|
||||
RequestHeader http.Header
|
||||
SubProtocols []string
|
||||
|
@ -51,7 +51,7 @@ func (sb *SocketBuilders) GetHandshakeTimeout() time.Duration {
|
|||
return sb.HandshakeTimeout
|
||||
}
|
||||
|
||||
func (sb *SocketBuilders) GetURL() *url.URL {
|
||||
func (sb *SocketBuilders) GetURL() string {
|
||||
return sb.URL
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ func (sb *SocketBuilders) GetWriteBufferSize() int {
|
|||
}
|
||||
|
||||
func (sb *SocketBuilders) Validate() {
|
||||
if nil == sb.URL {
|
||||
if "" == sb.URL {
|
||||
logging.Logger().Panic("Client Socket: URL must be specified")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user