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.
 
 
 
 
 
 

25 lines
695 B

// stcp_server.h — STCP server: listen, accept, handshake
#ifndef STCP_SERVER_H
#define STCP_SERVER_H
#ifdef __cplusplus
extern "C" {
#endif
#include "stcp.h"
typedef void (*stcp_connect_cb)(struct stcp_conn *conn, void *arg);
typedef void (*stcp_close_cb)(struct stcp_conn *conn, int err, void *arg);
struct stcp_server *stcp_server_create(struct UASYNC *ua, uint16_t port,
struct SC_MYKEYS *keys,
stcp_connect_cb connect_cb, void *arg,
stcp_close_cb close_cb, void *close_arg);
void stcp_server_destroy(struct stcp_server *srv);
#ifdef __cplusplus
}
#endif
#endif