Webcom C SDK
Data Structures | Macros | Typedefs | Enumerations | Functions
webcom-base.h File Reference
#include <poll.h>
#include <stddef.h>
#include <stdint.h>
Include dependency graph for webcom-base.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  wc_pollargs
 
struct  wc_timerargs
 
struct  wc_context_options
 

Macros

#define WC_POLLHUP   (POLLHUP|POLLERR)
 
#define WC_POLLIN   (POLLIN)
 
#define WC_POLLOUT   (POLLOUT)
 
#define WC_BASE_EVENT_OFFSET   0x00000001
 
#define WC_DATASYNC_EVENT_OFFSET   0x00000100
 
#define WC_AUTH_EVENT_OFFSET   0x00010000
 

Typedefs

typedef struct wc_context wc_context_t
 
typedef struct wc_datasync_context wc_datasync_context_t
 
typedef struct wc_auth_context wc_auth_context_t
 
typedef int(* wc_on_event_cb_t) (wc_event_t event, wc_context_t *ctx, void *data, size_t len)
 

Enumerations

enum  wc_pollsrc { WC_POLL_DATASYNC, WC_POLL_AUTH, _WC_POLL_MAX }
 
enum  wc_timersrc { WC_TIMER_DATASYNC_KEEPALIVE, WC_TIMER_DATASYNC_RECONNECT, WC_TIMER_AUTH, _WC_TIMER_MAX }
 
enum  wc_event_t {
  WC_EVENT_ADD_FD = WC_BASE_EVENT_OFFSET, WC_EVENT_DEL_FD, WC_EVENT_MODIFY_FD, WC_EVENT_SET_TIMER,
  WC_EVENT_DEL_TIMER, WC_EVENT_ON_CNX_CLOSED = WC_DATASYNC_EVENT_OFFSET, WC_EVENT_ON_SERVER_HANDSHAKE, WC_EVENT_ON_MSG_RECEIVED,
  WC_EVENT_ON_CNX_ERROR, WC_AUTH_ON_AUTH_REPLY = WC_AUTH_EVENT_OFFSET
}
 

Functions

void wc_dispatch_fd_event (wc_context_t *ctx, struct wc_pollargs *pa)
 
void wc_dispatch_timer_event (wc_context_t *ctx, enum wc_timersrc timer)
 
void * wc_context_get_user_data (wc_context_t *ctx)
 
wc_context_twc_context_create (struct wc_context_options *options)
 
void wc_context_destroy (wc_context_t *ctx)
 

Typedef Documentation

◆ wc_auth_context_t

typedef struct wc_auth_context wc_auth_context_t

◆ wc_context_t

typedef struct wc_context wc_context_t

◆ wc_datasync_context_t

typedef struct wc_datasync_context wc_datasync_context_t