The Sequence Toolkit
www.sequence-toolkit.com
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Macros | Functions
stk_tcp_client_api.h File Reference
#include "stk_env.h"
#include "stk_data_flow.h"
Include dependency graph for stk_tcp_client_api.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define stk_tcp_create_subscriber   stk_tcp_client_create_data_flow
 

Functions

stk_data_flow_tstk_tcp_client_create_data_flow (stk_env_t *env, char *name, stk_uint64 id, stk_options_t *options)
 
int stk_tcp_client_fd (stk_data_flow_t *svr_df)
 
stk_ret stk_tcp_client_data_flow_id_ip (stk_data_flow_t *df, struct sockaddr *data_flow_id, socklen_t addrlen)
 
stk_ret stk_tcp_client_data_flow_serverip (stk_data_flow_t *df, struct sockaddr *data_flow_id, socklen_t addrlen)
 
stk_ret stk_tcp_client_unhook_data_flow (stk_data_flow_t *df)
 

Detailed Description

The TCP client module provides TCP connectivity to applications. This module implements the data flow interface specified by the Sequence Toolkit. Applications should use the create API defined here, but use the standard destroy/send/receive APIs in stk_data_flow_api.h Applicatipns may receive or send sequences on data flows.

Macro Definition Documentation

#define stk_tcp_create_subscriber   stk_tcp_client_create_data_flow

Alias for Subscribers

Function Documentation

stk_data_flow_t* stk_tcp_client_create_data_flow ( stk_env_t env,
char *  name,
stk_uint64  id,
stk_options_t options 
)

Create a data flow for a TCP Client (connection).

See Also
stk_options.txt for accepted options
stk_data_flow.h
Returns
A handle to a Sequence Data Flow
stk_ret stk_tcp_client_data_flow_id_ip ( stk_data_flow_t df,
struct sockaddr *  data_flow_id,
socklen_t  addrlen 
)

Get the IP acting as the ID for this data flow.

Returns
Whether the IP address was filled out
stk_ret stk_tcp_client_data_flow_serverip ( stk_data_flow_t df,
struct sockaddr *  data_flow_id,
socklen_t  addrlen 
)

Get the server IP for this data flow.

Returns
Whether the IP address was filled out
int stk_tcp_client_fd ( stk_data_flow_t svr_df)

Get the File Descriptor for a data flow. Applications may use this to register with an event processing loop which calls select()/poll() etc.

Returns
The File Descriptor.
stk_ret stk_tcp_client_unhook_data_flow ( stk_data_flow_t df)

Force closing of resources related to a data flow without closing the data flow (E.G. closing sockets)

Returns
Whether unhooking the related resources succeeded