-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
27 additions
and
25 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
#ifndef SIMPLE_SOCKET_PORT_QUERY_HPP | ||
#define SIMPLE_SOCKET_PORT_QUERY_HPP | ||
|
||
#include <vector> | ||
|
||
int getAvailablePort(int startPort, int endPort, const std::vector<int>& excludePorts = {}); | ||
|
||
#endif//SIMPLE_SOCKET_PORT_QUERY_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,23 @@ | ||
|
||
set(sources | ||
AvailablePortQuery.cpp | ||
TCPSocket.cpp | ||
UDPSocket.cpp | ||
WebSocket.cpp | ||
"port_query.cpp" | ||
"TCPSocket.cpp" | ||
"UDPSocket.cpp" | ||
"WebSocket.cpp" | ||
) | ||
|
||
add_library(simple_socket ${sources}) | ||
add_library(simple_socket "${sources}") | ||
target_compile_features(simple_socket PUBLIC "cxx_std_17") | ||
|
||
if (WIN32) | ||
target_link_libraries(simple_socket ws2_32) | ||
target_link_libraries(simple_socket "ws2_32") | ||
endif () | ||
|
||
|
||
target_include_directories(simple_socket | ||
PUBLIC | ||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>" | ||
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>" | ||
PRIVATE | ||
"${CMAKE_CURRENT_SOURCE_DIR}" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
|
||
#include "TCPSocket.hpp" | ||
|
||
#include "SocketIncludes.hpp" | ||
#include "common.hpp" | ||
|
||
|
||
struct TCPSocket::Impl { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
|
||
#include "UDPSocket.hpp" | ||
|
||
#include "SocketIncludes.hpp" | ||
#include "common.hpp" | ||
|
||
|
||
struct UDPSocket::Impl { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters