mirror of
https://github.com/oe7drt/YSFClients.git
synced 2026-04-06 06:43:53 +00:00
add configuiration to bind to specific IP
This commit is contained in:
parent
815165141c
commit
0cfd041de9
7 changed files with 33 additions and 9 deletions
|
|
@ -44,11 +44,14 @@ CNetwork::~CNetwork()
|
|||
delete[] m_status;
|
||||
}
|
||||
|
||||
bool CNetwork::open()
|
||||
bool CNetwork::open(const char* bindaddr)
|
||||
{
|
||||
::fprintf(stdout, "Opening YSF network connection\n");
|
||||
if (strlen(bindaddr) > 0)
|
||||
::fprintf(stdout, "Opening YSF network connection on address %s\n", bindaddr);
|
||||
else
|
||||
::fprintf(stdout, "Opening YSF network connection on all interfaces\n");
|
||||
|
||||
return m_socket.open();
|
||||
return m_socket.open(bindaddr);
|
||||
}
|
||||
|
||||
bool CNetwork::writeData(const unsigned char* data, const in_addr& address, unsigned int port)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue