Board index » delphi » Need help with Indy 10
Joćo Ferreira
![]() Delphi Developer |
Need help with Indy 102005-10-21 11:18:31 PM delphi190 I am writing a client where i need to send an unsigned 16 bit value to a server with TCPClient of Indy 10 in Delphi 2005: ******************************************** First try: TCPClient.IOHandler.Write(value); where value is a smallint with data assigned.. Delphi (Indy) gives me ECheckError. ************************************************ Second try: BufferWidth, BufferHeight: short; BufferWidth := 1280; BufferHeight := 768; TCPClient.IOHandler.Write(RawToBytes(BufferWidth,sizeof(BufferWidth))); No error is displayed, but... on the server side (C++) i got a complete different value: int w = is->ReadU16() //gives me 5 int h = is->ReadU16() //gives me 3 ************************************************************* This only happens with data type of 16. Am i using the rigth data types for 16 bit value? I am new to delphi so this can be the problem. Thanks and best regards, JF |