2 * libwebsockets - small server side websockets and web server implementation
4 * Copyright (C) 2010-2019 Andy Green <andy@warmcat.com>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation:
9 * version 2.1 of the License.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21 * included from libwebsockets.h
25 * Abstract transport ops
28 typedef struct lws_abs_transport {
32 int (*create)(struct lws_abs *abs);
33 void (*destroy)(lws_abs_transport_inst_t **d);
35 /* events the abstract protocol invokes (handled by transport) */
37 int (*tx)(lws_abs_transport_inst_t *d, uint8_t *buf, size_t len);
38 int (*client_conn)(const lws_abs_t *abs);
39 int (*close)(lws_abs_transport_inst_t *d);
40 int (*ask_for_writeable)(lws_abs_transport_inst_t *d);
41 int (*set_timeout)(lws_abs_transport_inst_t *d, int reason, int secs);
42 int (*state)(lws_abs_transport_inst_t *d);
43 } lws_abs_transport_t;
46 * lws_abs_protocol_get_by_name() - returns a pointer to the named protocol ops
48 * \param name: the name of the abstract protocol
50 * Returns a pointer to the named protocol ops struct if available, otherwise
53 LWS_VISIBLE LWS_EXTERN const lws_abs_transport_t *
54 lws_abs_transport_get_by_name(const char *name);
57 * bring in public api pieces from transports
60 #include <libwebsockets/abstract/transports/raw-skt.h>
61 #include <libwebsockets/abstract/transports/unit-test.h>