small change
This commit is contained in:
parent
a8ef2fabef
commit
d39cb59c03
1 changed files with 5 additions and 5 deletions
|
@ -87,19 +87,19 @@ void CSocket::OnDataReceived()
|
||||||
quint16 SenderPort;
|
quint16 SenderPort;
|
||||||
|
|
||||||
// read block from network interface and query address of sender
|
// read block from network interface and query address of sender
|
||||||
const int iNumBytesRead = SocketDevice.readDatagram ( (char*) &vecbyRecBuf[0],
|
int iNumBytesRead = SocketDevice.readDatagram ( (char*) &vecbyRecBuf[0],
|
||||||
MAX_SIZE_BYTES_NETW_BUF, &SenderAddress, &SenderPort );
|
MAX_SIZE_BYTES_NETW_BUF, &SenderAddress, &SenderPort );
|
||||||
|
|
||||||
// convert address of client
|
|
||||||
CHostAddress RecHostAddr ( SenderAddress, SenderPort );
|
|
||||||
|
|
||||||
// check if an error occurred
|
// check if an error occurred
|
||||||
if ( iNumBytesRead < 0 )
|
if ( iNumBytesRead < 0 )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( bIsClient )
|
// convert address of client
|
||||||
|
const CHostAddress RecHostAddr ( SenderAddress, SenderPort );
|
||||||
|
|
||||||
|
if ( bIsClient )
|
||||||
{
|
{
|
||||||
// client
|
// client
|
||||||
// check if packet comes from the server we want to connect
|
// check if packet comes from the server we want to connect
|
||||||
|
|
Loading…
Reference in a new issue