12-18-2018, 06:21 PM
Clients are identified with MAC address. Every client has its own log file. There are following successive lines in the code.
1. Socket handle never changes.
2. Message data is correct. It is unique to client.
3. Third line sends message occasionally to wrong client.
henschen
Code:
// 1. Write socket handle to log file.
LogMessage(AnsiString().sprintf("Handle %X", IdContext->Binding->Handle));
// 2. Write message data (TIdByte ByteArray) to log file.
LogData(ByteArray);
// 3. Send message
IdContext->Connection->IOHandler->Write(ByteArray, ByteArray.Length, 0);
1. Socket handle never changes.
2. Message data is correct. It is unique to client.
3. Third line sends message occasionally to wrong client.
henschen