Client is the client for communicating with another Kite. It has Tell() and Go() methods for calling methods sync/async way.
| 36 | // Client is the client for communicating with another Kite. |
| 37 | // It has Tell() and Go() methods for calling methods sync/async way. |
| 38 | type Client struct { |
| 39 | protocol.Kite // remote kite information |
| 40 | |
| 41 | // LocalKite references to the kite which owns the client |
| 42 | // connection. |
| 43 | LocalKite *Kite |
| 44 | |
| 45 | // Auth is a credential used to authenticate with a remote kite. |
| 46 | // |
| 47 | // Required if remote kite requires authentication. |
| 48 | Auth *Auth |
| 49 | |
| 50 | // Reconnect says whether we should reconnect with a new |
| 51 | // session when an old one got invalidated or the connection |
| 52 | // broke. |
| 53 | Reconnect bool |
| 54 | |
| 55 | // URL specifies the SockJS URL of the remote kite. |
| 56 | URL string |
| 57 | |
| 58 | // Config is used when setting up client connection to |
| 59 | // the remote kite. |
| 60 | // |
| 61 | // If Config is nil, LocalKite.Config is used instead. |
| 62 | Config *config.Config |
| 63 | |
| 64 | // Concurrent specified whether we should process incoming messages concurrently. |
| 65 | // |
| 66 | // Defaults to true. |
| 67 | Concurrent bool |
| 68 | |
| 69 | // ConcurrentCallbacks, when true, makes execution of callbacks in |
| 70 | // incoming messages concurrent. This may result in a callback |
| 71 | // received in an earlier message to be executed after a callback |
| 72 | // from a new meesage - no order is guaranteed, it's up to Go scheduler. |
| 73 | // |
| 74 | // By default this field is false to be backward-compatible with |
| 75 | // go1.4 scheduling behaviour. |
| 76 | ConcurrentCallbacks bool |
| 77 | |
| 78 | // ClientFunc is called each time new sockjs.Session is established. |
| 79 | // The session will use returned *http.Client for HTTP round trips |
| 80 | // for XHR transport. |
| 81 | // |
| 82 | // If ClientFunc is nil, sockjs.Session will use default, internal |
| 83 | // *http.Client value. |
| 84 | // |
| 85 | // Deprecated: Set Config.XHR of the local kite, that |
| 86 | // owns this connection, insead. |
| 87 | ClientFunc func(*sockjsclient.DialOptions) *http.Client |
| 88 | |
| 89 | // ReadBufferSize is the input buffer size. By default it's 4096. |
| 90 | // |
| 91 | // Deprecated: Set Config.Websocket.ReadBufferSize of the local kite, |
| 92 | // that owns this connection, instead. |
| 93 | ReadBufferSize int |
| 94 | |
| 95 | // WriteBufferSize is the output buffer size. By default it's 4096. |
nothing calls this directly
no outgoing calls
no test coverage detected