Hi Angus
    in SAMPLE OverbyteIcsTcpSrv,  I haven't changed a lot.
   I have set breakpoint in DataAvailable event, but I found it not execute, 
maybe the server can not receive these HEX string?
   I have make a attachment(my PROG), Ask the teachers to guide .
  Thanks !!!


At 2016-12-29 22:23:00, "Angus Robertson - Magenta Systems Ltd" 
<an...@magsys.co.uk> wrote:
>>   I have turn off LineMode, when I send "FA 0A 02 FF AA 55 01 00 
>> B3 06" HEX string by client, the server can not receive any thing.
>Please show the code you have added to DataAvailable event to process
>the buffer you have filled using the Receive function.  
>It is your problem to write code to decide when the packet has been
>received, not ICS.  
>The TcpSrv sample uses LineMode and ReceiveStr which is only suitable
>for ASCII based protocols.   You need something like:
>   FRxBuffer: array [0..2048] of AnsiChar;
>  len := Receive (@RxBuffer, SizeOf (RxBuffer)-1); 
>  { loop through RxBuffer looking for packet end }
>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
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

Reply via email to