[EMAIL PROTECTED] wrote: > tell me, how do you write those smallints? If I'm not mistaken, there > is no > special Indy-Write to write a smallint, but only integers (32 bit).
The smallInt is being sent as two Ascii characters, thus let's say the value that I want to send is 107 then Chr(Lo(107)) = #0 and Chr(Hi(107)) = 'k', so the first two characters on the string is #0'k'. If one does a normal SmallInt(#0'k') in Delphi this returns 107. However on the Indy server AThread.Connection.IOHandler.ReadSmallInt(False) returns 0 instead of 107. > Did you check, weather the inputbuffer is empty after the smallint-read? Yes, there is still data in the buffer, however, this data includes these two bytes. It is as if ReadSmallInt never ocurred. Cheers Louis ----------------------------------------------------- Home page: http://groups.yahoo.com/group/delphi-en/ To unsubscribe: [EMAIL PROTECTED] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/delphi-en/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

