On Mon, 2010-06-07 at 14:15 +0200, Felipe Monteiro de Carvalho wrote: > Ok, thanks, now I seam to be able to get it working using > TLTCPComponent, but I am unsure about how to read data. > > Ok, I read that it will call OnReceive when there is data ready, but I > couldn't find anything about how much data is waiting to be read? > > I would like to get each single Packet which is sent to my program and > store them in a Queue, which will later be dealt with, but using only > the Get method I don't see how I can Find out how much data is > available. > > Without this I don't know how big a buffer I should send for this > function, but I guess I could just give a very big buffer, but then > there are no comments in the function indicating if it returns the > amount of bytes written. > > Also, how would I know where are the packets separated? I mean, two > packets could arrive very quickly and I would be reading both together > instead of first the first one and then the next one.
did you have a look at the console http examples? fpget in this case? (examples/console/lhttp/fpget) Joost. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal