0e413ef353e37f51503bd9818ecacd5fb77ccdb7
[mesa.git] / src / util / os_socket.h
1 /*
2 * Copyright 2019 Intel Corporation
3 * SPDX-License-Identifier: MIT
4 *
5 * Socket operations helpers
6 */
7
8 #ifndef _OS_SOCKET_H_
9 #define _OS_SOCKET_H_
10
11 #include <stdio.h>
12 #include <stdbool.h>
13
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17
18 int os_socket_accept(int s);
19
20 int os_socket_listen_abstract(const char *path, int count);
21
22 ssize_t os_socket_recv(int socket, void *buffer, size_t length, int flags);
23 ssize_t os_socket_send(int socket, const void *buffer, size_t length, int flags);
24
25 void os_socket_block(int s, bool block);
26 void os_socket_close(int s);
27
28 #ifdef __cplusplus
29 }
30 #endif
31
32 #endif /* _OS_SOCKET_H_ */