Hello, int receivedCount = GetRcvdCount(); if(receivedCount) { FRcvdLine.SetLength(receivedCount); receivedCount = Receive(&FRcvdLine[1], receivedCount); if(receivedCount > 0) { FRcvdLine.SetLength(receivedCount); // remove trailing CR/LF if(FRcvdLine[receivedCount] == '\n') { int Len = receivedCount - 1; // check for Len > linelimit
if(Len > 0 && FRcvdLine[Len] == '\r') --Len; FRcvdLine.SetLength(Len); } else FRcvdLine.SetLength(0); } } What do you think? This seems MUCH faster as I wrote but wonder if it's the right way... Regards, SZ -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be