| 1 |
/* |
| 2 |
* Copyright (C) 2013 Red Hat, Inc. |
| 3 |
* SPDX-License-Identifier: LGPL-2.1-or-later |
| 4 |
*/ |
| 5 |
|
| 6 |
#ifndef __WEB_SOCKET_SERVER_H__ |
| 7 |
#define __WEB_SOCKET_SERVER_H__ |
| 8 |
|
| 9 |
#include "websocketconnection.h" |
| 10 |
|
| 11 |
#include <gio/gio.h> |
| 12 |
|
| 13 |
G_BEGIN_DECLS |
| 14 |
|
| 15 |
#define WEB_SOCKET_TYPE_SERVER (web_socket_server_get_type ()) |
| 16 |
#define WEB_SOCKET_SERVER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), WEB_SOCKET_TYPE_SERVER, WebSocketServer)) |
| 17 |
#define WEB_SOCKET_IS_SERVER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), WEB_SOCKET_TYPE_SERVER)) |
| 18 |
#define WEB_SOCKET_SERVER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), WEB_SOCKET_TYPE_SERVER, WebSocketServerClass)) |
| 19 |
#define WEB_SOCKET_IS_SERVER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), WEB_SOCKET_TYPE_SERVER)) |
| 20 |
|
| 21 |
GType web_socket_server_get_type (void) G_GNUC_CONST; |
| 22 |
|
| 23 |
WebSocketConnection * web_socket_server_new_for_stream (const gchar * const *origins, |
| 24 |
const gchar * const *protocols, |
| 25 |
GIOStream *io_stream, |
| 26 |
GHashTable *request_headers, |
| 27 |
GByteArray *input_buffer); |
| 28 |
|
| 29 |
G_END_DECLS |
| 30 |
|
| 31 |
#endif /* __WEB_SOCKET_SERVER_H__ */ |