xale-db
1.0
minimal SQL engine, written in c++
Loading...
Searching...
No Matches
SocketFactory.h
Go to the documentation of this file.
1
#ifndef NET_SOCKET_FACTORY_H
2
#define NET_SOCKET_FACTORY_H
3
4
#include "
Net/Socket/ISocket.h
"
5
#include "
Net/Socket/IListenerSocket.h
"
6
7
#if defined(__linux__) || defined(linux) || defined(__GNUG__)
8
#include "
Net/Socket/LinuxSocket.h
"
9
#include "
Net/Socket/LinuxListenerSocket.h
"
10
#elif defined(_WIN32) || defined(_WIN64)
11
#include "
Net/Socket/WindowsSocket.h
"
12
#include "
Net/Socket/WindowsListenerSocket.h
"
13
#else
14
#error "Unsupported platform"
15
#endif
16
17
#include <memory>
18
19
namespace
Xale::Net
20
{
21
class
SocketFactory
22
{
23
public
:
24
static
std::unique_ptr<ISocket>
createSocket
();
25
static
std::unique_ptr<IListenerSocket>
createListenerSocket
();
26
};
27
}
28
29
#endif
// NET_SOCKET_FACTORY_H
IListenerSocket.h
ISocket.h
LinuxListenerSocket.h
LinuxSocket.h
WindowsListenerSocket.h
WindowsSocket.h
Xale::Net::SocketFactory
Definition
SocketFactory.h:22
Xale::Net::SocketFactory::createSocket
static std::unique_ptr< ISocket > createSocket()
Xale::Net::SocketFactory::createListenerSocket
static std::unique_ptr< IListenerSocket > createListenerSocket()
Xale::Net
Definition
IListenerSocket.h:7
include
Net
Socket
SocketFactory.h
Generated by
1.16.1