mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
check port
This commit is contained in:
parent
b41a17d548
commit
cdc5fce583
@ -248,10 +248,15 @@ namespace client
|
||||
m_State = eWSCTryConnect;
|
||||
m_Parent->CreateStreamTo(m_RemoteAddr, m_RemotePort, std::bind(&WebSocksConn::ConnectResult, this, std::placeholders::_1));
|
||||
} else if (state == eWSCDatagram) {
|
||||
LogPrint(eLogDebug, "websocks: datagram mode initiated");
|
||||
m_State = eWSCDatagram;
|
||||
BeginDatagram();
|
||||
SendResponse("");
|
||||
if (m_RemotePort >= 0 && m_RemotePort <= 65535)
|
||||
{
|
||||
LogPrint(eLogDebug, "websocks: datagram mode initiated");
|
||||
m_State = eWSCDatagram;
|
||||
BeginDatagram();
|
||||
SendResponse("");
|
||||
}
|
||||
else
|
||||
SendResponse("invalid port");
|
||||
} else {
|
||||
LogPrint(eLogWarning, "websocks: invalid state change ", m_State, " -> ", state);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user