You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

26 lines
797 B

// stcp_client.h — STCP client: connect, handshake
#ifndef STCP_CLIENT_H
#define STCP_CLIENT_H
#ifdef __cplusplus
extern "C" {
#endif
#include "stcp.h"
typedef void (*stcp_ready_cb)(struct stcp_conn *conn, void *arg);
typedef void (*stcp_close_cb)(struct stcp_conn *conn, int err, void *arg);
struct stcp_client *stcp_client_connect(struct UASYNC *ua, const char *addr, uint16_t port,
struct SC_MYKEYS *keys, const uint8_t *peer_pubkey,
stcp_ready_cb ready_cb, void *arg,
stcp_close_cb close_cb, void *close_arg);
void stcp_client_destroy(struct stcp_client *cli);
struct stcp_conn *stcp_client_get_conn(struct stcp_client *cli);
#ifdef __cplusplus
}
#endif
#endif