DialOptions are used to overwrite default behavior of the websocket session. Deprecated: Use *config.Config struct instead for configuring SockJS connection.
| 90 | // Deprecated: Use *config.Config struct instead for |
| 91 | // configuring SockJS connection. |
| 92 | type DialOptions struct { |
| 93 | // URL of the remote kite. |
| 94 | // |
| 95 | // Required. |
| 96 | BaseURL string |
| 97 | |
| 98 | // ReadBufferSize is the buffer size used for |
| 99 | // reads on a websocket connection. |
| 100 | // |
| 101 | // Deprecated: Set Config.Dialer.ReadBufferSize of |
| 102 | // the local kite instead. |
| 103 | ReadBufferSize int |
| 104 | |
| 105 | // WriteBufferSize is the buffer size used for |
| 106 | // writes on a websocket connection. |
| 107 | // |
| 108 | // Deprecated: Set Config.Dialer.WriteBufferSize of the |
| 109 | // the local kite instead. |
| 110 | WriteBufferSize int |
| 111 | |
| 112 | // Timeout specifies dial timeout |
| 113 | // |
| 114 | // Deprecated: Set Config.Dialer.Dial of the local kite instead. |
| 115 | Timeout time.Duration |
| 116 | |
| 117 | // ClientFunc gives new HTTP client for use with XHR connections. |
| 118 | // |
| 119 | // Deprecated: Set Config.ClientFunc of the local kite instead. |
| 120 | ClientFunc func(*DialOptions) *http.Client |
| 121 | } |
| 122 | |
| 123 | func (opts *DialOptions) client() *http.Client { |
| 124 | if opts.ClientFunc != nil { |
nothing calls this directly
no outgoing calls
no test coverage detected