Guardtime KSI c SDK
Typedefs | Functions
net_tcp.h File Reference
#include "net.h"

Go to the source code of this file.

Typedefs

typedef struct KSI_TcpClient_st KSI_TcpClient
 

Functions

int KSI_TcpClient_new (KSI_CTX *ctx, KSI_NetworkClient **client)
 
int KSI_TcpClient_setPublicationUrl (KSI_NetworkClient *client, const char *val)
 
int KSI_TcpClient_setExtender (KSI_NetworkClient *client, const char *host, unsigned port, const char *user, const char *key)
 
int KSI_TcpClient_setAggregator (KSI_NetworkClient *client, const char *host, unsigned port, const char *user, const char *key)
 
int KSI_TcpClient_setTransferTimeoutSeconds (KSI_NetworkClient *client, int val)
 
int KSI_TcpAsyncClient_new (KSI_CTX *ctx, KSI_AsyncClient **c)
 
int KSI_TcpAsyncClient_setService (KSI_AsyncClient *c, const char *host, unsigned port, const char *user, const char *pass)
 

Typedef Documentation

typedef struct KSI_TcpClient_st KSI_TcpClient

Function Documentation

int KSI_TcpAsyncClient_new ( KSI_CTX ctx,
KSI_AsyncClient **  c 
)

Creates a new TCP async client.

Parameters
[in]ctxKSI context.
[out]cPointer to the receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
See also
KSI_AsyncClient_free
KSI_TcpAsyncClient_setService
int KSI_TcpAsyncClient_setService ( KSI_AsyncClient c,
const char *  host,
unsigned  port,
const char *  user,
const char *  pass 
)

Setter for the tcp service endpoint parameters.

Parameters
[in]cPointer to tcp async client.
[in]hostHost name.
[in]portPort number.
[in]userUser name.
[in]passHMAC shared secret.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
See also
KSI_TcpAsyncClient_new
int KSI_TcpClient_new ( KSI_CTX ctx,
KSI_NetworkClient **  client 
)

Creates a new TCP client.

Parameters
[in]ctxKSI context.
[out]clientPointer to the receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
int KSI_TcpClient_setAggregator ( KSI_NetworkClient client,
const char *  host,
unsigned  port,
const char *  user,
const char *  key 
)

Setter for the tcp aggregator parameters.

Parameters
[in]clientPointer to tcp client.
[in]hostHost name.
[in]portPort number.
[in]userUser name.
[in]keyHMAC shared secret.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
int KSI_TcpClient_setExtender ( KSI_NetworkClient client,
const char *  host,
unsigned  port,
const char *  user,
const char *  key 
)

Setter for the tcp client extender parameters.

Parameters
[in]clientPointer to tcp client.
[in]hostHost name.
[in]portPort number.
[in]userUser name.
[in]keyHMAC shared secret.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
int KSI_TcpClient_setPublicationUrl ( KSI_NetworkClient client,
const char *  val 
)

Setter for the publications file URL. The value will be copied and thus can be freed after successful call.

Parameters
[in]clientPointer to the http client.
[in]valNull-terminated URL.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
int KSI_TcpClient_setTransferTimeoutSeconds ( KSI_NetworkClient client,
int  val 
)

Setter for the read, write, timeout in seconds.

Parameters
[in]clientPointer to the tcp client.
[in]valTimeout in seconds.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).