Lightstreamer C++ Client SDK
Loading...
Searching...
No Matches
ConnectionOptions.h
1#ifndef INCLUDED_Lightstreamer_ConnectionOptions
2#define INCLUDED_Lightstreamer_ConnectionOptions
3
4#include "../Lightstreamer.h"
5
6namespace Lightstreamer {
7
19 HaxeObject _delegate = nullptr;
20
21 void initDelegate(HaxeObject client) {
22 _delegate = LightstreamerClient_getConnectionOptions(client);
23 }
24
25 friend class LightstreamerClient;
26public:
27 ConnectionOptions(const ConnectionOptions&) = delete;
28 ConnectionOptions& operator=(const ConnectionOptions&) = delete;
29
31
33 Lightstreamer_releaseHaxeObject(_delegate);
34 }
43 return ConnectionOptions_getContentLength(_delegate);
44 }
53 return ConnectionOptions_getFirstRetryMaxDelay(_delegate);
54 }
61 std::string getForcedTransport() {
62 return ConnectionOptions_getForcedTransport(_delegate);
63 }
71 std::map<std::string, std::string> getHttpExtraHeaders() {
72 return ConnectionOptions_getHttpExtraHeaders(_delegate);
73 }
84 return ConnectionOptions_getIdleTimeout(_delegate);
85 }
101 return ConnectionOptions_getKeepaliveInterval(_delegate);
102 }
114 return ConnectionOptions_getRequestedMaxBandwidth(_delegate);
115 }
135 std::string getRealMaxBandwidth() {
136 return ConnectionOptions_getRealMaxBandwidth(_delegate);
137 }
149 return ConnectionOptions_getPollingInterval(_delegate);
150 }
161 return ConnectionOptions_getReconnectTimeout(_delegate);
162 }
174 return ConnectionOptions_getRetryDelay(_delegate);
175 }
184 return ConnectionOptions_getReverseHeartbeatInterval(_delegate);
185 }
195 return ConnectionOptions_getStalledTimeout(_delegate);
196 }
207 return ConnectionOptions_getSessionRecoveryTimeout(_delegate);
208 }
218 return ConnectionOptions_isHttpExtraHeadersOnSessionCreationOnly(_delegate);
219 }
228 return ConnectionOptions_isServerInstanceAddressIgnored(_delegate);
229 }
237 return ConnectionOptions_isSlowingEnabled(_delegate);
238 }
260 void setContentLength(long contentLength) {
261 ConnectionOptions_setContentLength(_delegate, contentLength);
262 }
285 void setFirstRetryMaxDelay(long firstRetryMaxDelay) {
286 ConnectionOptions_setFirstRetryMaxDelay(_delegate, firstRetryMaxDelay);
287 }
331 void setForcedTransport(const std::string& forcedTransport) {
332 ConnectionOptions_setForcedTransport(_delegate, &forcedTransport);
333 }
357 void setHttpExtraHeaders(const std::map<std::string, std::string>& headers) {
358 ConnectionOptions_setHttpExtraHeaders(_delegate, &headers);
359 }
378 void setHttpExtraHeadersOnSessionCreationOnly(bool httpExtraHeadersOnSessionCreationOnly) {
379 ConnectionOptions_setHttpExtraHeadersOnSessionCreationOnly(_delegate, httpExtraHeadersOnSessionCreationOnly);
380 }
405 void setIdleTimeout(long idleTimeout) {
406 ConnectionOptions_setIdleTimeout(_delegate, idleTimeout);
407 }
433 void setKeepaliveInterval(long keepaliveInterval) {
434 ConnectionOptions_setKeepaliveInterval(_delegate, keepaliveInterval);
435 }
466 void setRequestedMaxBandwidth(const std::string& maxBandwidth) {
467 ConnectionOptions_setRequestedMaxBandwidth(_delegate, &maxBandwidth);
468 }
501 void setPollingInterval(long pollingInterval) {
502 ConnectionOptions_setPollingInterval(_delegate, pollingInterval);
503 }
527 void setReconnectTimeout(long reconnectTimeout) {
528 ConnectionOptions_setReconnectTimeout(_delegate, reconnectTimeout);
529 }
577 void setRetryDelay(long retryDelay) {
578 ConnectionOptions_setRetryDelay(_delegate, retryDelay);
579 }
623 void setReverseHeartbeatInterval(long reverseHeartbeatInterval) {
624 ConnectionOptions_setReverseHeartbeatInterval(_delegate, reverseHeartbeatInterval);
625 }
654 void setServerInstanceAddressIgnored(bool serverInstanceAddressIgnored) {
655 ConnectionOptions_setServerInstanceAddressIgnored(_delegate, serverInstanceAddressIgnored);
656 }
679 void setSlowingEnabled(bool slowingEnabled) {
680 ConnectionOptions_setSlowingEnabled(_delegate, slowingEnabled);
681 }
701 void setStalledTimeout(long stalledTimeout) {
702 ConnectionOptions_setStalledTimeout(_delegate, stalledTimeout);
703 }
732 void setSessionRecoveryTimeout(long sessionRecoveryTimeout) {
733 ConnectionOptions_setSessionRecoveryTimeout(_delegate, sessionRecoveryTimeout);
734 }
735};
736
737} // namespace Lightstreamer
738
739#endif // INCLUDED_Lightstreamer_ConnectionOptions
Used by LightstreamerClient to provide an extra connection properties data object.
Definition ConnectionOptions.h:18
std::string getForcedTransport()
Inquiry method that gets the value of the forced transport (if any).
Definition ConnectionOptions.h:61
void setContentLength(long contentLength)
Setter method that sets the length in bytes to be used by the Server for the response body on a strea...
Definition ConnectionOptions.h:260
std::string getRealMaxBandwidth()
Inquiry method that gets the maximum bandwidth that can be consumed for the data coming from Lightstr...
Definition ConnectionOptions.h:135
void setHttpExtraHeaders(const std::map< std::string, std::string > &headers)
Setter method that enables/disables the setting of extra HTTP headers to all the request performed to...
Definition ConnectionOptions.h:357
void setForcedTransport(const std::string &forcedTransport)
Setter method that can be used to disable/enable the Stream-Sense algorithm and to force the client t...
Definition ConnectionOptions.h:331
std::string getRequestedMaxBandwidth()
Inquiry method that gets the maximum bandwidth that can be consumed for the data coming from Lightstr...
Definition ConnectionOptions.h:113
void setServerInstanceAddressIgnored(bool serverInstanceAddressIgnored)
Setter method that can be used to disable/enable the automatic handling of server instance address th...
Definition ConnectionOptions.h:654
void setFirstRetryMaxDelay(long firstRetryMaxDelay)
Setter method that sets the maximum time to wait before trying a new connection to the Server in case...
Definition ConnectionOptions.h:285
void setHttpExtraHeadersOnSessionCreationOnly(bool httpExtraHeadersOnSessionCreationOnly)
Setter method that enables/disables a restriction on the forwarding of the extra http headers specifi...
Definition ConnectionOptions.h:378
bool isHttpExtraHeadersOnSessionCreationOnly()
Inquiry method that checks if the restriction on the forwarding of the configured extra http headers ...
Definition ConnectionOptions.h:217
long getContentLength()
Inquiry method that gets the length expressed in bytes to be used by the Server for the response body...
Definition ConnectionOptions.h:42
bool isServerInstanceAddressIgnored()
Inquiry method that checks if the client is going to ignore the server instance address that will pos...
Definition ConnectionOptions.h:227
long getKeepaliveInterval()
Inquiry method that gets the interval between two keepalive packets sent by Lightstreamer Server on a...
Definition ConnectionOptions.h:100
void setRetryDelay(long retryDelay)
Setter method that sets.
Definition ConnectionOptions.h:577
void setPollingInterval(long pollingInterval)
Setter method that sets the polling interval used for polling connections.
Definition ConnectionOptions.h:501
void setReverseHeartbeatInterval(long reverseHeartbeatInterval)
Setter method that enables/disables the reverse-heartbeat mechanism by setting the heartbeat interval...
Definition ConnectionOptions.h:623
long getReconnectTimeout()
Inquiry method that gets the time the client, after entering "STALLED" status, is allowed to keep wai...
Definition ConnectionOptions.h:160
void setIdleTimeout(long idleTimeout)
Setter method that sets the maximum time the Server is allowed to wait for any data to be sent in res...
Definition ConnectionOptions.h:405
std::map< std::string, std::string > getHttpExtraHeaders()
Inquiry method that gets a map object containing the extra headers to be sent to the server.
Definition ConnectionOptions.h:71
bool isSlowingEnabled()
Inquiry method that checks if the slowing algorithm is enabled or not.
Definition ConnectionOptions.h:236
void setSessionRecoveryTimeout(long sessionRecoveryTimeout)
Setter method that sets the maximum time allowed for attempts to recover the current session upon an ...
Definition ConnectionOptions.h:732
void setRequestedMaxBandwidth(const std::string &maxBandwidth)
Setter method that sets the maximum bandwidth expressed in kilobits/s that can be consumed for the da...
Definition ConnectionOptions.h:466
long getIdleTimeout()
Inquiry method that gets the maximum time the Server is allowed to wait for any data to be sent in re...
Definition ConnectionOptions.h:83
void setReconnectTimeout(long reconnectTimeout)
Setter method that sets the time the client, after entering "STALLED" status, is allowed to keep wait...
Definition ConnectionOptions.h:527
long getReverseHeartbeatInterval()
Inquiry method that gets the reverse-heartbeat interval expressed in milliseconds.
Definition ConnectionOptions.h:183
void setKeepaliveInterval(long keepaliveInterval)
Setter method that sets the interval between two keepalive packets to be sent by Lightstreamer Server...
Definition ConnectionOptions.h:433
void setStalledTimeout(long stalledTimeout)
Setter method that sets the extra time the client is allowed to wait when an expected keepalive packe...
Definition ConnectionOptions.h:701
long getStalledTimeout()
Inquiry method that gets the extra time the client can wait when an expected keepalive packet has not...
Definition ConnectionOptions.h:194
long getRetryDelay()
Inquiry method that gets the minimum time to wait before trying a new connection to the Server in cas...
Definition ConnectionOptions.h:173
long getSessionRecoveryTimeout()
Inquiry method that gets the maximum time allowed for attempts to recover the current session upon an...
Definition ConnectionOptions.h:206
long getFirstRetryMaxDelay()
Inquiry method that gets the maximum time to wait before trying a new connection to the Server in cas...
Definition ConnectionOptions.h:52
void setSlowingEnabled(bool slowingEnabled)
Setter method that turns on or off the slowing algorithm.
Definition ConnectionOptions.h:679
long getPollingInterval()
Inquiry method that gets the polling interval used for polling connections.
Definition ConnectionOptions.h:148
Facade class for the management of the communication to Lightstreamer Server.
Definition LightstreamerClient.h:34