dxFeed Graal CXX API
|
dxFeed Native C API enums, structs and functions declarations More...
#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
Classes | |
struct | dxfc_dxendpoint_property_t |
The simple key-value structure that represents an endpoint's property. More... | |
Typedefs | |
typedef enum dxfc_error_code_t | dxfc_error_code_t |
List of error codes. | |
typedef enum dxfc_dxendpoint_role_t | dxfc_dxendpoint_role_t |
Represents the role of endpoint that was specified during its creation. | |
typedef enum dxfc_dxendpoint_state_t | dxfc_dxendpoint_state_t |
Represents the current state of endpoint. | |
typedef void(* | dxfc_dxendpoint_state_change_listener) (dxfc_dxendpoint_state_t old_state, dxfc_dxendpoint_state_t new_state, void *user_data) |
The endpoint current state change listener. | |
typedef struct dxfc_dxendpoint_property_t | dxfc_dxendpoint_property_t |
The simple key-value structure that represents an endpoint's property. | |
typedef void * | dxfc_dxendpoint_t |
The dxFeed endpoint handle. | |
typedef void * | dxfc_dxendpoint_builder_t |
The dxFeed endpoint's builder handle. | |
typedef void * | dxfc_dxfeed_t |
The dxFeed handle. | |
typedef void * | dxfc_dxpublisher_t |
The dxFeed publisher handle. | |
Enumerations | |
enum | dxfc_error_code_t { DXFC_EC_SUCCESS = 0 , DXFC_EC_G_ERR , DXFC_EC_ERROR = 10000 } |
List of error codes. More... | |
enum | dxfc_dxendpoint_role_t { DXFC_DXENDPOINT_ROLE_FEED = 0 , DXFC_DXENDPOINT_ROLE_ON_DEMAND_FEED = 1 , DXFC_DXENDPOINT_ROLE_STREAM_FEED = 2 , DXFC_DXENDPOINT_ROLE_PUBLISHER = 3 , DXFC_DXENDPOINT_ROLE_STREAM_PUBLISHER = 4 , DXFC_DXENDPOINT_ROLE_LOCAL_HUB = 5 } |
Represents the role of endpoint that was specified during its creation. More... | |
enum | dxfc_dxendpoint_state_t { DXFC_DXENDPOINT_STATE_NOT_CONNECTED = 0 , DXFC_DXENDPOINT_STATE_CONNECTING = 1 , DXFC_DXENDPOINT_STATE_CONNECTED = 2 , DXFC_DXENDPOINT_STATE_CLOSED = 3 } |
Represents the current state of endpoint. More... | |
Functions | |
dxfc_error_code_t | dxfc_system_set_property (const char *key, const char *value) |
Sets the system property indicated by the specified key. | |
dxfc_error_code_t | dxfc_system_get_property (const char *key, DXFC_OUT char *buffer, size_t buffer_size) |
Gets the system property indicated by the specified key. | |
dxfc_error_code_t | dxfc_dxendpoint_new_builder (DXFC_OUT dxfc_dxendpoint_builder_t *builder) |
Creates new dxFeed endpoint's builder instance. | |
dxfc_error_code_t | dxfc_dxendpoint_builder_with_role (dxfc_dxendpoint_builder_t builder, dxfc_dxendpoint_role_t role) |
Sets role for the created dxFeed endpoint. | |
dxfc_error_code_t | dxfc_dxendpoint_builder_with_name (dxfc_dxendpoint_builder_t builder, const char *name) |
Changes name that is used to distinguish multiple endpoints in the same process (GraalVM Isolate) in logs and in other diagnostic means. | |
dxfc_error_code_t | dxfc_dxendpoint_builder_with_property (dxfc_dxendpoint_builder_t builder, const char *key, const char *value) |
Sets the specified property. | |
dxfc_error_code_t | dxfc_dxendpoint_builder_with_properties (dxfc_dxendpoint_builder_t builder, const dxfc_dxendpoint_property_t **properties, size_t size) |
Sets all supported properties from the provided properties object. | |
dxfc_error_code_t | dxfc_dxendpoint_builder_supports_property (dxfc_dxendpoint_builder_t builder, const char *key, DXFC_OUT int *supports) |
Checks if a property is supported. | |
dxfc_error_code_t | dxfc_dxendpoint_builder_build (dxfc_dxendpoint_builder_t builder, void *user_data, DXFC_OUT dxfc_dxendpoint_t *endpoint) |
Builds the new dxFeed endpoint instance. | |
dxfc_error_code_t | dxfc_dxendpoint_builder_free (dxfc_dxendpoint_builder_t builder) |
Removes a builder from the registry. | |
dxfc_error_code_t | dxfc_dxendpoint_get_instance (void *user_data, DXFC_OUT dxfc_dxendpoint_t *endpoint) |
Returns a default application-wide singleton instance of dxFeed endpoint with a FEED role. | |
dxfc_error_code_t | dxfc_dxendpoint_get_instance2 (dxfc_dxendpoint_role_t role, void *user_data, DXFC_OUT dxfc_dxendpoint_t *endpoint) |
Returns a default application-wide singleton instance of DXEndpoint for a specific role. | |
dxfc_error_code_t | dxfc_dxendpoint_create (void *user_data, DXFC_OUT dxfc_dxendpoint_t *endpoint) |
Creates an endpoint with FEED role. | |
dxfc_error_code_t | dxfc_dxendpoint_create2 (dxfc_dxendpoint_role_t role, void *user_data, DXFC_OUT dxfc_dxendpoint_t *endpoint) |
Creates an endpoint with a specified role. | |
dxfc_error_code_t | dxfc_dxendpoint_close (dxfc_dxendpoint_t endpoint) |
Closes this endpoint. | |
dxfc_error_code_t | dxfc_dxendpoint_close_and_await_termination (dxfc_dxendpoint_t endpoint) |
Closes this endpoint and wait until all pending data processing tasks are completed. | |
dxfc_error_code_t | dxfc_dxendpoint_get_role (dxfc_dxendpoint_t endpoint, DXFC_OUT dxfc_dxendpoint_role_t *role) |
Returns the role of this endpoint. | |
dxfc_error_code_t | dxfc_dxendpoint_user (dxfc_dxendpoint_t endpoint, const char *user) |
Changes user name for this endpoint. | |
dxfc_error_code_t | dxfc_dxendpoint_password (dxfc_dxendpoint_t endpoint, const char *password) |
Changes password for this endpoint. | |
dxfc_error_code_t | dxfc_dxendpoint_connect (dxfc_dxendpoint_t endpoint, const char *address) |
Connects to the specified remote address. | |
dxfc_error_code_t | dxfc_dxendpoint_reconnect (dxfc_dxendpoint_t endpoint) |
Terminates all established network connections and initiates connecting again with the same address. | |
dxfc_error_code_t | dxfc_dxendpoint_disconnect (dxfc_dxendpoint_t endpoint) |
Terminates all remote network connections. | |
dxfc_error_code_t | dxfc_dxendpoint_disconnect_and_clear (dxfc_dxendpoint_t endpoint) |
Terminates all remote network connections and clears stored data. | |
dxfc_error_code_t | dxfc_dxendpoint_await_processed (dxfc_dxendpoint_t endpoint) |
Waits until this endpoint stops processing data (becomes quiescent). | |
dxfc_error_code_t | dxfc_dxendpoint_await_not_connected (dxfc_dxendpoint_t endpoint) |
Waits while this endpoint state becomes NOT_CONNECTED or CLOSED. | |
dxfc_error_code_t | dxfc_dxendpoint_get_state (dxfc_dxendpoint_t endpoint, DXFC_OUT dxfc_dxendpoint_state_t *state) |
Returns the state of this endpoint. | |
dxfc_error_code_t | dxfc_dxendpoint_add_state_change_listener (dxfc_dxendpoint_t endpoint, dxfc_dxendpoint_state_change_listener listener) |
Adds listener that is notified about changes in state property. | |
dxfc_error_code_t | dxfc_dxendpoint_remove_state_change_listener (dxfc_dxendpoint_t endpoint, dxfc_dxendpoint_state_change_listener listener) |
Removes listener that is notified about changes in state property. | |
dxfc_error_code_t | dxfc_dxendpoint_get_feed (dxfc_dxendpoint_t endpoint, DXFC_OUT dxfc_dxfeed_t *feed) |
dxfc_error_code_t | dxfc_dxendpoint_get_publisher (dxfc_dxendpoint_t endpoint, DXFC_OUT dxfc_dxpublisher_t *publisher) |
dxfc_error_code_t | dxfc_dxendpoint_free (dxfc_dxendpoint_t endpoint) |
Removes the dxFeed endpoint from the registry. | |
dxFeed Native C API enums, structs and functions declarations
typedef void* dxfc_dxendpoint_builder_t |
The dxFeed endpoint's builder handle.
It is used for searching, adding builders to the "registry", deleting builders from the "registry" and calling functions associated with a particular builder.
The "registry" is responsible for neatly closing resources, shutting down work, and freeing up memory on shutdown. This can be forced by calling the dxfc_dxendpoint_builder_free() function.
typedef void(* dxfc_dxendpoint_state_change_listener) (dxfc_dxendpoint_state_t old_state, dxfc_dxendpoint_state_t new_state, void *user_data) |
The endpoint current state change listener.
typedef void* dxfc_dxendpoint_t |
The dxFeed endpoint handle.
It is used for searching, adding endpoints to the "registry", deleting endpoints from the "registry" and calling functions associated with a particular endpoint.
The "registry" is responsible for neatly closing resources, shutting down work, and freeing up memory on shutdown. This can be forced by calling the dxfc_dxendpoint_free() function.
Represents the role of endpoint that was specified during its creation.
Enumerator | |
---|---|
DXFC_DXENDPOINT_ROLE_FEED |
dxfc_dxendpoint_get_feed() function returns feed object that subscribes to the remote data feed provider and receives events from it. When event processing threads cannot keep up (don't have enough CPU time), data is dynamically conflated to minimize latency between received events and their processing time. This endpoint is automatically connected to the configured data feed. |
DXFC_DXENDPOINT_ROLE_ON_DEMAND_FEED |
|
DXFC_DXENDPOINT_ROLE_STREAM_FEED |
dxfc_dxendpoint_get_feed() function returns feed object that subscribes to the data from the opened files and receives events from them. Events from the files are not conflated, are not skipped, and are processed as fast as possible. Note, that in this role, dxfc_dxfeed_get_last_event() function does not work. |
DXFC_DXENDPOINT_ROLE_PUBLISHER |
dxfc_dxendpoint_get_publisher() function returns a publisher object that publishes events to all connected feeds. Note, that in this role, dxfc_dxfeed_get_last_event() function does not work and time-series subscription is not supported. This endpoint is automatically connected to the configured data feed. |
DXFC_DXENDPOINT_ROLE_STREAM_PUBLISHER |
dxfc_dxendpoint_get_publisher() function returns a publisher object that publishes events to all connected feeds. Published events are not conflated, are not skipped, and are processed as fast as possible. Note, that in this role, dxfc_dxfeed_get_last_event() function does not work and time-series subscription is not supported. |
DXFC_DXENDPOINT_ROLE_LOCAL_HUB |
Events that are published via publisher are delivered to local feed only. |
Represents the current state of endpoint.
Enumerator | |
---|---|
DXFC_DXENDPOINT_STATE_NOT_CONNECTED | Endpoint was created by is not connected to remote endpoints. |
DXFC_DXENDPOINT_STATE_CONNECTING | The connect function was called to establish connection to remove endpoint, but connection is not actually established yet or was lost. |
DXFC_DXENDPOINT_STATE_CONNECTED | The connection to remote endpoint is established. |
DXFC_DXENDPOINT_STATE_CLOSED | Endpoint was closed. |
enum dxfc_error_code_t |
dxfc_error_code_t dxfc_dxendpoint_add_state_change_listener | ( | dxfc_dxendpoint_t | endpoint, |
dxfc_dxendpoint_state_change_listener | listener ) |
Adds listener that is notified about changes in state property.
Installed listener can be removed by dxfc_dxendpoint_remove_state_change_listener() function.
endpoint | The dxFeed endpoint |
listener | The listener to add |
References DXFC_EC_ERROR, and DXFC_EC_SUCCESS.
dxfc_error_code_t dxfc_dxendpoint_await_not_connected | ( | dxfc_dxendpoint_t | endpoint | ) |
Waits while this endpoint state becomes NOT_CONNECTED or CLOSED.
It is a signal that any files that were opened with dxfc_dxendpoint_connect(endpoint, "file:...") function were finished reading, but not necessary were completely processed by the corresponding subscription listeners. Use dxfc_dxendpoint_and_await_termination() after this function returns to make sure that all processing has completed.
This function is blocking.
endpoint | The dxFeed endpoint |
References DXFC_EC_ERROR, and DXFC_EC_SUCCESS.
dxfc_error_code_t dxfc_dxendpoint_await_processed | ( | dxfc_dxendpoint_t | endpoint | ) |
Waits until this endpoint stops processing data (becomes quiescent).
This is important when writing data to file via "tape:..." connector to make sure that all published data was written before closing this endpoint.
endpoint | The dxFeed endpoint |
References DXFC_EC_ERROR, and DXFC_EC_SUCCESS.
dxfc_error_code_t dxfc_dxendpoint_builder_build | ( | dxfc_dxendpoint_builder_t | builder, |
void * | user_data, | ||
DXFC_OUT dxfc_dxendpoint_t * | endpoint ) |
Builds the new dxFeed endpoint instance.
builder | The endpoint's builder | |
user_data | User data that will be passed to the endpoint's state transition listeners. | |
[out] | endpoint | The created endpoint |
References DXFC_EC_ERROR, and DXFC_EC_SUCCESS.
dxfc_error_code_t dxfc_dxendpoint_builder_free | ( | dxfc_dxendpoint_builder_t | builder | ) |
Removes a builder from the registry.
builder | The endpoint's builder |
References DXFC_EC_ERROR, and DXFC_EC_SUCCESS.
dxfc_error_code_t dxfc_dxendpoint_builder_supports_property | ( | dxfc_dxendpoint_builder_t | builder, |
const char * | key, | ||
DXFC_OUT int * | supports ) |
Checks if a property is supported.
builder | The endpoint's builder | |
key | The property's key to be checked for support | |
[out] | supports | 1 if the corresponding property key is supported. |
References DXFC_EC_ERROR, and DXFC_EC_SUCCESS.
dxfc_error_code_t dxfc_dxendpoint_builder_with_name | ( | dxfc_dxendpoint_builder_t | builder, |
const char * | name ) |
Changes name that is used to distinguish multiple endpoints in the same process (GraalVM Isolate) in logs and in other diagnostic means.
builder | The endpoint's builder |
name | The endpoint's name |
References DXFC_EC_ERROR, and DXFC_EC_SUCCESS.
dxfc_error_code_t dxfc_dxendpoint_builder_with_properties | ( | dxfc_dxendpoint_builder_t | builder, |
const dxfc_dxendpoint_property_t ** | properties, | ||
size_t | size ) |
Sets all supported properties from the provided properties object.
builder | The endpoint's builder |
properties | The endpoint's properties |
size | The size of the endpoint's properties |
References DXFC_EC_ERROR, DXFC_EC_SUCCESS, dxfc_dxendpoint_property_t::key, and dxfc_dxendpoint_property_t::value.
dxfc_error_code_t dxfc_dxendpoint_builder_with_property | ( | dxfc_dxendpoint_builder_t | builder, |
const char * | key, | ||
const char * | value ) |
Sets the specified property.
Unsupported properties are ignored.
builder | The endpoint's builder |
key | The endpoint's property key |
value | The endpoint's property value |
References DXFC_EC_ERROR, and DXFC_EC_SUCCESS.
dxfc_error_code_t dxfc_dxendpoint_builder_with_role | ( | dxfc_dxendpoint_builder_t | builder, |
dxfc_dxendpoint_role_t | role ) |
Sets role for the created dxFeed endpoint.
Default role is FEED.
builder | The endpoint's builder |
role | The endpoint's role |
References DXFC_EC_ERROR, and DXFC_EC_SUCCESS.
dxfc_error_code_t dxfc_dxendpoint_close | ( | dxfc_dxendpoint_t | endpoint | ) |
Closes this endpoint.
All network connection are terminated as with dxfc_dxendpoint_disconnect() function and no further connections can be established.
The endpoint state immediately becomes CLOSED. All resources associated with this endpoint are released.
endpoint | The dxFeed endpoint to close |
References DXFC_EC_ERROR, and DXFC_EC_SUCCESS.
dxfc_error_code_t dxfc_dxendpoint_close_and_await_termination | ( | dxfc_dxendpoint_t | endpoint | ) |
Closes this endpoint and wait until all pending data processing tasks are completed.
This function performs the same actions as dxfc_dxendpoint_close(), but also awaits termination of all outstanding data processing tasks. It is designed to be used with STREAM_FEED role after dxfc_dxendpoint_await_not_connected() function returns to make sure that file was completely processed.
This function is blocking.
endpoint | The dxFeed endpoint |
References DXFC_EC_ERROR, and DXFC_EC_SUCCESS.
dxfc_error_code_t dxfc_dxendpoint_connect | ( | dxfc_dxendpoint_t | endpoint, |
const char * | address ) |
Connects to the specified remote address.
Previously established connections are closed if the new address is different from the old one. This function does nothing if address does not change or if this endpoint is CLOSED. The endpoint state immediately becomes CONNECTING otherwise.
The address string is provided with the market data vendor agreement. Use "demo.dxfeed.com:7300" for a demo quote feed.
The simplest address strings have the following format:
host:port
to establish a TCP/IP connection.:port
to listen for a TCP/IP connection with a plain socket connector (good for up to a few hundred of connections).For premium services access credentials must be configured before invocation of connect
function using user and password functions.
This function does not wait until connection actually gets established. The actual connection establishment happens asynchronously after the invocation of this function. However, this function waits until notification about state transition from DXFC_DXENDPOINT_STATE_NOT_CONNECTED to DXFC_DXENDPOINT_STATE_CONNECTING gets processed by all listeners.
endpoint | The dxFeed endpoint |
address | The data source address |
References DXFC_EC_ERROR, and DXFC_EC_SUCCESS.
dxfc_error_code_t dxfc_dxendpoint_create | ( | void * | user_data, |
DXFC_OUT dxfc_dxendpoint_t * | endpoint ) |
Creates an endpoint with FEED role.
The result of this function is the same as dxfc_dxendpoint_create2(DXFC_DXENDPOINT_ROLE_FEED, user_data, &endpoint)
. This is a shortcut to
user_data | User data that will be passed to the endpoint's state transition listeners. | |
[out] | endpoint | The created endpoint |
References DXFC_EC_ERROR, and DXFC_EC_SUCCESS.
dxfc_error_code_t dxfc_dxendpoint_create2 | ( | dxfc_dxendpoint_role_t | role, |
void * | user_data, | ||
DXFC_OUT dxfc_dxendpoint_t * | endpoint ) |
Creates an endpoint with a specified role.
This is a shortcut to
role | The role of dxFeed endpoint instance | |
user_data | User data that will be passed to the endpoint's state transition listeners. | |
[out] | endpoint | The created endpoint |
References DXFC_EC_ERROR, and DXFC_EC_SUCCESS.
dxfc_error_code_t dxfc_dxendpoint_disconnect | ( | dxfc_dxendpoint_t | endpoint | ) |
Terminates all remote network connections.
This function does nothing if this endpoint is CLOSED. The endpoint state immediately becomes NOT_CONNECTED otherwise.
This function does not release all resources that are associated with this endpoint. Use dxfc_dxendpoint_disconnect() function to release all resources.
endpoint | The dxFeed endpoint to disconnect |
References DXFC_EC_ERROR, and DXFC_EC_SUCCESS.
dxfc_error_code_t dxfc_dxendpoint_disconnect_and_clear | ( | dxfc_dxendpoint_t | endpoint | ) |
Terminates all remote network connections and clears stored data.
This function does nothing if this endpoint is CLOSED. The endpoint state immediately becomes NOT_CONNECTED otherwise.
This function does not release all resources that are associated with this endpoint. Use dxfc_dxendpoint_close() function to release all resources.
endpoint | The dxFeed endpoint |
References DXFC_EC_ERROR, and DXFC_EC_SUCCESS.
dxfc_error_code_t dxfc_dxendpoint_free | ( | dxfc_dxendpoint_t | endpoint | ) |
Removes the dxFeed endpoint from the registry.
endpoint | The dxFeed endpoint to remove |
References DXFC_EC_ERROR, and DXFC_EC_SUCCESS.
dxfc_error_code_t dxfc_dxendpoint_get_feed | ( | dxfc_dxendpoint_t | endpoint, |
DXFC_OUT dxfc_dxfeed_t * | feed ) |
endpoint | The dxFeed endpoint | |
[out] | feed |
References DXFC_EC_SUCCESS.
dxfc_error_code_t dxfc_dxendpoint_get_instance | ( | void * | user_data, |
DXFC_OUT dxfc_dxendpoint_t * | endpoint ) |
Returns a default application-wide singleton instance of dxFeed endpoint with a FEED role.
Most applications use only a single data-source and should rely on this function to get one. This function creates an endpoint on the first use with a default configuration. You can provide configuration via system properties.
This is a shortcut to
user_data | User data that will be passed to the endpoint's state transition listeners. | |
[out] | endpoint | The created endpoint |
References DXFC_EC_ERROR, and DXFC_EC_SUCCESS.
dxfc_error_code_t dxfc_dxendpoint_get_instance2 | ( | dxfc_dxendpoint_role_t | role, |
void * | user_data, | ||
DXFC_OUT dxfc_dxendpoint_t * | endpoint ) |
Returns a default application-wide singleton instance of DXEndpoint for a specific role.
Most applications use only a single data-source and should rely on this function to get one. This function creates an endpoint with the corresponding role on the first use with a default configuration. You can provide configuration via system properties.
The configuration does not have to include an address. You can use connect(endpoint, address) and dxfc_dxendpoint_disconnect() functions on the instance that is returned by this function to programmatically establish and tear-down connection to a user-provided address.
If you need a fully programmatic configuration and/or multiple endpoints of the same role in your application, then create a custom instance of dxFeed endpoint with dxfc_dxendpoint_new_builder() function, configure it, and use dxfc_dxendpoint_builder_build() function.
role | The role of dxFeed endpoint instance | |
user_data | User data that will be passed to the endpoint's state transition listeners. | |
[out] | endpoint | The created endpoint |
References DXFC_EC_ERROR, and DXFC_EC_SUCCESS.
dxfc_error_code_t dxfc_dxendpoint_get_publisher | ( | dxfc_dxendpoint_t | endpoint, |
DXFC_OUT dxfc_dxpublisher_t * | publisher ) |
endpoint | The dxFeed endpoint | |
[out] | publisher |
References DXFC_EC_SUCCESS.
dxfc_error_code_t dxfc_dxendpoint_get_role | ( | dxfc_dxendpoint_t | endpoint, |
DXFC_OUT dxfc_dxendpoint_role_t * | role ) |
Returns the role of this endpoint.
endpoint | The dxFeed endpoint | |
[out] | role | The role of this endpoint |
References DXFC_EC_ERROR, and DXFC_EC_SUCCESS.
dxfc_error_code_t dxfc_dxendpoint_get_state | ( | dxfc_dxendpoint_t | endpoint, |
DXFC_OUT dxfc_dxendpoint_state_t * | state ) |
Returns the state of this endpoint.
endpoint | The dxFeed endpoint | |
[out] | state | The state of this endpoint |
References DXFC_EC_ERROR, and DXFC_EC_SUCCESS.
dxfc_error_code_t dxfc_dxendpoint_new_builder | ( | DXFC_OUT dxfc_dxendpoint_builder_t * | builder | ) |
Creates new dxFeed endpoint's builder instance.
Use dxfc_dxendpoint_builder_build to build an instance of dxFeed endpoint when all configuration properties were set.
[out] | builder | The created endpoint's builder. |
References DXFC_EC_ERROR, and DXFC_EC_SUCCESS.
dxfc_error_code_t dxfc_dxendpoint_password | ( | dxfc_dxendpoint_t | endpoint, |
const char * | password ) |
Changes password for this endpoint.
This function shall be called before connect together with user to configure service access credentials.
endpoint | The dxFeed endpoint |
password | The user password |
References DXFC_EC_ERROR, and DXFC_EC_SUCCESS.
dxfc_error_code_t dxfc_dxendpoint_reconnect | ( | dxfc_dxendpoint_t | endpoint | ) |
Terminates all established network connections and initiates connecting again with the same address.
The effect of the function is alike to invoking dxfc_dxendpoint_disconnect() and dxfc_dxendpoint_connect() with the current address, but internal resources used for connections may be reused by implementation. TCP connections with multiple target addresses will try switch to an alternative address, configured reconnect timeouts will apply.
Note: The function will not connect endpoint that was not initially connected with dxfc_dxendpoint_connect() function or was disconnected with dxfc_dxendpoint_disconnect() function.
The function initiates a short-path way for reconnecting, so whether observers will have a chance to see an intermediate state DXFC_DXENDPOINT_STATE_NOT_CONNECTED depends on the implementation.
endpoint | The dxFeed endpoint to reconnect |
References DXFC_EC_ERROR, and DXFC_EC_SUCCESS.
dxfc_error_code_t dxfc_dxendpoint_remove_state_change_listener | ( | dxfc_dxendpoint_t | endpoint, |
dxfc_dxendpoint_state_change_listener | listener ) |
Removes listener that is notified about changes in state property.
It removes the listener that was previously installed with dxfc_dxendpoint_add_state_change_listener() function.
endpoint | The dxFeed endpoint |
listener | The listener to remove |
References DXFC_EC_ERROR, and DXFC_EC_SUCCESS.
dxfc_error_code_t dxfc_dxendpoint_user | ( | dxfc_dxendpoint_t | endpoint, |
const char * | user ) |
Changes user name for this endpoint.
This function shall be called before connect together with password to configure service access credentials.
endpoint | The dxFeed endpoint |
user | The user name |
References DXFC_EC_ERROR, and DXFC_EC_SUCCESS.
dxfc_error_code_t dxfc_system_get_property | ( | const char * | key, |
DXFC_OUT char * | buffer, | ||
size_t | buffer_size ) |
Gets the system property indicated by the specified key.
The buffer must be allocated in advance. If the system property value does not fit into the buffer, it will be truncated. The buffer should be large enough to the \0 at the end. Invalid UTF-8 characters resulting from a string that does not fit in the buffer will be discarded.
key | The name of the system property (UTF-8 string) | |
[out] | buffer | The buffer to store the system property (UTF-8 string) |
buffer_size | The buffer's size. |
dxfc_error_code_t dxfc_system_set_property | ( | const char * | key, |
const char * | value ) |
Sets the system property indicated by the specified key.
key | The name of the system property (UTF-8 string). |
value | The value of the system property (UTF-8 string). |
References DXFC_EC_ERROR, DXFC_EC_SUCCESS, and System::setProperty().