mirror of
https://github.com/g4klx/ircDDBGateway.git
synced 2026-04-06 06:43:52 +00:00
Add UDP Hole Punching for G2
This commit is contained in:
parent
3107a7f60e
commit
d1c55b9394
3 changed files with 17 additions and 0 deletions
|
|
@ -144,6 +144,18 @@ CAMBEData* CG2ProtocolHandler::readAMBE()
|
|||
return data;
|
||||
}
|
||||
|
||||
void CG2ProtocolHandler::PunchUDPHole(const wxString& address)
|
||||
{
|
||||
unsigned char buffer[1];
|
||||
::memset(buffer, 0, 1);
|
||||
|
||||
in_addr addr = CUDPReaderWriter::lookup(address);
|
||||
|
||||
//wxLogError(wxT("Punching hole to %s"), address.mb_str());
|
||||
|
||||
m_socket.write(buffer, 1, addr, G2_DV_PORT);
|
||||
}
|
||||
|
||||
void CG2ProtocolHandler::close()
|
||||
{
|
||||
m_socket.close();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue