#include <signal.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/prctl.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <string.h>
#include <string>
#include <stdexcept>
#include <unistd.h>
#include <boost/python.hpp>
#include <boost/asio.hpp>
Go to the source code of this file.
◆ appendPythonPath()
void appendPythonPath |
( |
const std::string & |
path | ) |
|
|
inline |
Appends 'path' to PYTHON_PATH env variable.
◆ bindOrFindFreePort()
int bindOrFindFreePort |
( |
std::string |
hostIpv4, |
|
|
int |
port = 0 |
|
) |
| |
|
inline |
Attempts to bind to a given address.
- Parameters
-
hostIpv4 | IP4 address of the host |
port | Port to connect to, if 0 a free port is searched and used |
- Returns
- Port used in the connection, same as "port" argument or found free port
When "port" is 0, the function asks the OS to look for a free port number. Throws an exception if the connection is not successful
◆ bindToAddress()
void bindToAddress |
( |
std::string |
hostIpv4, |
|
|
int |
port |
|
) |
| |
|
inline |
Attempts to bind to a given address.
- Parameters
-
hostIpv4 | IP4 address of the host |
port | Port to connect to |
Throws an exception if the connection is not successful
◆ getFreePort()
int getFreePort |
( |
std::string |
hostIpv4 | ) |
|
|
inline |
Returns a free port number.
- Parameters
-
hostIpv4 | IP4 address of the host |
- Returns
- Free port number
Asks the OS to look for a free port number