Ocean
Network.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  */
7 
8 #ifndef FACEBOOK_NETWORK_NETWORK_H
9 #define FACEBOOK_NETWORK_NETWORK_H
10 
11 #ifndef _WINDOWS
12  #include <sys/socket.h>
13  #include <netinet/in.h>
14 #endif
15 
16 #include "ocean/base/Base.h"
17 #include "ocean/base/Messenger.h"
18 
19 namespace Ocean
20 {
21 
22 namespace Network
23 {
24 
25 /**
26  * @defgroup network Ocean Network Library
27  * @{
28  * The Ocean Network Library provides a huge number of network functionalities.<br>
29  * The library supports connection less and connection oriented clients and servers.<br>
30  * Additionally, this library holds a powerful streaming infrastructure streaming various data types.<br>
31  *
32  * For connection less transmission use a UDP client or server.<br>
33  * For connection oriented transmission use a TCP client or server.<br>
34  * Also, this library provides the possibility to resolve network addresses or services.<br>
35  * @see UDPClient, UDPServer, TCPClient, TCPServer, Resolver.
36  *
37  * The streaming server is implemented as an on-demand streaming server.<br>
38  * Configuration tasks are done using a TCP connection, the data is streamed via a UDP connection.<br>
39  * The server is independent from the streaming data and supports different streaming channels.<br>
40  * Additionally, each channel accepts more than one subscriber allowing several clients to receive the same stream.<br>
41  *
42  * However, each streaming client can receive one provides channel only.<br>
43  * That means that you have to use more than one client to receive more than one data stream.<br>
44  * @see StreamingServer, StreamingClient.
45  *
46  * The library is platform independent.
47  * @}
48  */
49 
50 /**
51  * @namespace Ocean::Network Namespace of the Network library.<p>
52  * The Namespace Ocean::Network is used in the entire Ocean Network Library.
53  */
54 
55 // Defines OCEAN_NETWORK_EXPORT for dll export and import.
56 #if defined(_WINDOWS) && defined(OCEAN_RUNTIME_SHARED)
57  #ifdef USE_OCEAN_NETWORK_EXPORT
58  #define OCEAN_NETWORK_EXPORT __declspec(dllexport)
59  #else
60  #define OCEAN_NETWORK_EXPORT __declspec(dllimport)
61  #endif
62 #else
63  #define OCEAN_NETWORK_EXPORT
64 #endif
65 
66 }
67 
68 }
69 
70 #endif
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15