Re: [twsocket] Sending a mix of text and records through TWSocket

2005-10-27 Thread Geppy Piloni
At 09.33 27/10/2005 +0200, you wrote: Hello Geppy, I send the command and the record without waiting any reply from server. Yes, but I'm thinking over and it should work. TCP respect data sequence so cannot be any problem. As soon as server get's the command (and data len with it I suppose),

Re: [twsocket] Sending a mix of text and records through TWSocket

2005-10-27 Thread Geppy Piloni
At 13.16 27/10/2005 +0200, you wrote: Hello Geppy, Here is a working client example for this server: [SNIP] --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz Hi Wilfried, first of all, thank you for your time and help :) Things are going

Re: [twsocket] Sending a mix of text and records through TWSocket

2005-10-27 Thread Arno Garrels
Geppy Piloni wrote: data Move(Rcvd^, Data, SizeOf(Data)); // Rcvd is the pointer to the Should be Move(Rcvd^, Data, SizeOf(TData)); Length of the record Data instead of length of the variable. Arno Garrels -- To unsubscribe or change your settings for TWSocket mailing list please goto

Re: [twsocket] Sending a mix of text and records through TWSocket

2005-10-27 Thread Geppy Piloni
In your server1 example, I modified the ReceiveBinComplete method of TClient as follows: procedure TClient.ReceiveBinComplete; var data : TData; begin Log(ltSystem, IntToStr(RcvdCount) + ' bytes received'); WritePtr := 0; // get ready for next receive

Re: [twsocket] Sending a mix of text and records through TWSocket

2005-10-27 Thread Wilfried Mestdagh
Hello Geppy, FillChar(Data, SizeOf(TData), 0); Sorry for that. I have habitude to get rid of compiler warnings, even in a short demo where in this case it was not needed :( I'm glad it works for you now :) 1 additional note. You can also receive direct in your record. This save an additional

[twsocket] Sending a mix of text and records through TWSocket

2005-10-26 Thread Geppy Piloni
Hi all, I'm trying to implement the client server architecture described here: http://tinyurl.com/benop My first approach was with Indy 10, but after some attempts, I found quite difficult to manage the complexity of multithread programming, so I dropped Indy and now I'm trying ICS. I had a

Re: [twsocket] Sending a mix of text and records through TWSocket

2005-10-26 Thread Kirk Dunlap
Geppy, It would be helpful to see how you are receiving it. Show us some code on the receive side of this. Kirk On 10/26/05, Geppy Piloni [EMAIL PROTECTED] wrote: Hi all, I'm trying to implement the client server architecture described here: http://tinyurl.com/benop My first approach

Re: [twsocket] Sending a mix of text and records through TWSocket

2005-10-26 Thread Wilfried Mestdagh
Hello Geppy, As Kirk and Arno mentioned show us how you receive the data. maybe one remark at the moment: wsocket.LineMode := True; WSocket.SendStr(EditCommand.Text + #13#10); // the command is 'DATA ' // r fields filled with some data pr := @r; wsocket.LineMode := False;

Re: [twsocket] Sending a mix of text and records through TWSocket

2005-10-26 Thread Angus Robertson - Magenta Systems Ltd
Starting from various TCP client inlcuded in ICS examples, I tried to send through TWSocket a mix of text commands and records but I wasn't successful. On the server, I receive correctly the text command but not the record. What I'm doing wrong? You would need to be listening with