From b19cb58c3e82cc6ab231a5fa052f4dde5cb33335 Mon Sep 17 00:00:00 2001 From: crusader Date: Fri, 1 Dec 2017 13:00:40 +0900 Subject: [PATCH] ing --- client/socket.go | 2 +- client/socket_builder.go | 2 +- client/socket_builders.go | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/socket.go b/client/socket.go index 367ae72..1bb14db 100644 --- a/client/socket.go +++ b/client/socket.go @@ -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 } diff --git a/client/socket_builder.go b/client/socket_builder.go index 357267f..f2426d5 100644 --- a/client/socket_builder.go +++ b/client/socket_builder.go @@ -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 diff --git a/client/socket_builders.go b/client/socket_builders.go index 1908dd4..b10d7d0 100644 --- a/client/socket_builders.go +++ b/client/socket_builders.go @@ -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") }