Asterisk - The Open Source Telephony Project GIT-master-f36a736
Functions
transport_websocket.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

struct aeap_transport_websocketaeap_transport_websocket_create (void)
 Creates (heap allocated), and initializes a transport websocket. More...
 

Function Documentation

◆ aeap_transport_websocket_create()

struct aeap_transport_websocket * aeap_transport_websocket_create ( void  )

Creates (heap allocated), and initializes a transport websocket.

Returns
A transport websocket object, or NULL on error

Definition at line 238 of file transport_websocket.c.

239{
240 struct aeap_transport_websocket *transport;
241
242 transport = ast_calloc(1, sizeof(*transport));
243 if (!transport) {
244 ast_log(LOG_ERROR, "AEAP websocket: unable to create transport websocket");
245 return NULL;
246 }
247
248 if (transport_websocket_init(transport)) {
249 ast_free(transport);
250 return NULL;
251 }
252
253 return transport;
254}
#define ast_free(a)
Definition: astmm.h:180
#define ast_calloc(num, len)
A wrapper for calloc()
Definition: astmm.h:202
#define ast_log
Definition: astobj2.c:42
#define LOG_ERROR
#define NULL
Definition: resample.c:96
static int transport_websocket_init(struct aeap_transport_websocket *transport)
Initialize a transport websocket object, and set its virtual table.

References ast_calloc, ast_free, ast_log, LOG_ERROR, NULL, and transport_websocket_init().

Referenced by aeap_transport_create().