libsocket
headers
framing.hpp
Go to the documentation of this file.
1
#ifndef LIBSOCKET_FRAMING_HPP_5a97931a8115428aac8fd1adf96e4595
2
#define LIBSOCKET_FRAMING_HPP_5a97931a8115428aac8fd1adf96e4595
3
4
#include <stdint.h>
5
10
/*
11
The committers of the libsocket project, all rights reserved
12
(c) 2016, dermesser <lbo@spheniscida.de>
13
14
Redistribution and use in source and binary forms, with or without
15
modification, are permitted provided that the following conditions are met:
16
17
1. Redistributions of source code must retain the above copyright notice,
18
this list of conditions and the following disclaimer.
19
2. Redistributions in binary form must reproduce the above copyright notice,
20
this list of conditions and the following disclaimer in the documentation
21
and/or other materials provided with the distribution.
22
23
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS “AS IS” AND ANY
24
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26
DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
27
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33
34
*/
35
36
namespace
libsocket
{
37
const
size_t
FRAMING_PREFIX_LENGTH = 4;
38
39
void
encode_uint32(uint32_t n,
char
* dst);
40
uint32_t decode_uint32(
const
char
* src);
41
}
// namespace libsocket
42
43
#endif
libsocket
Contains libsocket elements.
Definition:
dgramclient.hpp:41
Generated on Sun Mar 29 2020 23:58:37 for libsocket by
1.8.15