vendor/github.com/gorilla/websocket/client.go
changeset 251 1c52a0eeb952
parent 242 2a9ec03fe5a1
child 260 445e01aede7e
equal deleted inserted replaced
250:c040f992052f 251:1c52a0eeb952
    68 	TLSClientConfig *tls.Config
    68 	TLSClientConfig *tls.Config
    69 
    69 
    70 	// HandshakeTimeout specifies the duration for the handshake to complete.
    70 	// HandshakeTimeout specifies the duration for the handshake to complete.
    71 	HandshakeTimeout time.Duration
    71 	HandshakeTimeout time.Duration
    72 
    72 
    73 	// ReadBufferSize and WriteBufferSize specify I/O buffer sizes. If a buffer
    73 	// ReadBufferSize and WriteBufferSize specify I/O buffer sizes in bytes. If a buffer
    74 	// size is zero, then a useful default size is used. The I/O buffer sizes
    74 	// size is zero, then a useful default size is used. The I/O buffer sizes
    75 	// do not limit the size of the messages that can be sent or received.
    75 	// do not limit the size of the messages that can be sent or received.
    76 	ReadBufferSize, WriteBufferSize int
    76 	ReadBufferSize, WriteBufferSize int
    77 
    77 
    78 	// WriteBufferPool is a pool of buffers for write operations. If the value
    78 	// WriteBufferPool is a pool of buffers for write operations. If the value
   138 // DialContext creates a new client connection. Use requestHeader to specify the
   138 // DialContext creates a new client connection. Use requestHeader to specify the
   139 // origin (Origin), subprotocols (Sec-WebSocket-Protocol) and cookies (Cookie).
   139 // origin (Origin), subprotocols (Sec-WebSocket-Protocol) and cookies (Cookie).
   140 // Use the response.Header to get the selected subprotocol
   140 // Use the response.Header to get the selected subprotocol
   141 // (Sec-WebSocket-Protocol) and cookies (Set-Cookie).
   141 // (Sec-WebSocket-Protocol) and cookies (Set-Cookie).
   142 //
   142 //
   143 // The context will be used in the request and in the Dialer
   143 // The context will be used in the request and in the Dialer.
   144 //
   144 //
   145 // If the WebSocket handshake fails, ErrBadHandshake is returned along with a
   145 // If the WebSocket handshake fails, ErrBadHandshake is returned along with a
   146 // non-nil *http.Response so that callers can handle redirects, authentication,
   146 // non-nil *http.Response so that callers can handle redirects, authentication,
   147 // etcetera. The response body may not contain the entire response and does not
   147 // etcetera. The response body may not contain the entire response and does not
   148 // need to be closed by the application.
   148 // need to be closed by the application.