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