Re: [twsocket] I want to receive bin string by wsocketserver

2016-12-29 Thread Wilfried Mestdagh
Hi Sunxiao, Set it in code: Cli.LineEnd := #$FA; But you where takling about "hex string". Now it looks we are talking about binary data. Wich of the 2 is it? Met vriendelijke groeten, Wilfried Mestdagh Op 29-12-16 om 14:41 schreef sxbug: Hi Wilfried Mestdagh Thank you for your replay.

Re: [twsocket] I want to receive bin string by wsocketserver

2016-12-29 Thread Angus Robertson - Magenta Systems Ltd
> in SAMPLE OverbyteIcsTcpSrv, I haven't changed a lot. Unless you change a lot, as previously advised, it simply will not work with binary data. There are numerous ICS components and samples that deal with binary data, you have lots of source code to examine and borrow. > I have make a

Re: [twsocket] I want to receive bin string by wsocketserver

2016-12-29 Thread sxbug
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 !!!

Re: [twsocket] I want to receive bin string by wsocketserver

2016-12-29 Thread Angus Robertson - Magenta Systems Ltd
> 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

Re: [twsocket] I want to receive bin string by wsocketserver

2016-12-29 Thread sxbug
Hi Wilfried Mestdagh Thank you for your replay. I have understand the structure of the packet .But I can NOT set lineEnd to #FA, it auto change to #0. What can I do ? Thanks sunxiao At 2016-12-29 18:15:03, "Wilfried Mestdagh"

Re: [twsocket] I want to receive bin string by wsocketserver

2016-12-29 Thread sxbug
Hi Angus Thank you for your replay. In OverbyteICSTcpSrv.dpr, I can not set LineEnd to #FA, if I set to #FA ,it change to #0 auto. 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. What can I do? Thanks

Re: [twsocket] I want to receive bin string by wsocketserver

2016-12-29 Thread Angus Robertson - Magenta Systems Ltd
> I found OverbyteICSTcpSrv.dpr can achieve my need. but it > only recieve string include #13#10. How can I deal with ? Turn off LineMode and receive one character at a time, checking them one at a time until you've got enough. You have to understand the protocol to process it properly. In

Re: [twsocket] I want to receive bin string by wsocketserver

2016-12-28 Thread sxbug
Hi sir: My Clients are some GPRS moudle, they send some HEX data,like : FA 21 02 FF 00 13 20 00 08 FF AA 55 00 00 00 00 00 00 00 00 00 00 00 13 00 00 00 01 FF FF FF F6 00 I found OverbyteICSTcpSrv.dpr can achieve my need. but it only recieve string include #13#10. How can I deal with ?