Thread View: borland.public.cppbuilder.internet.socket
1 messages
1 total messages
Started by skoob mcallister
Sun, 21 Sep 2008 05:12
TidTCPClient write function - stopping at byte 0x00
Author: skoob mcallister
Date: Sun, 21 Sep 2008 05:12
Date: Sun, 21 Sep 2008 05:12
23 lines
2111 bytes
2111 bytes
I'm having some issues with a program I am writing. I need to be able to read/write with a server that communicates through hex bytes. I first ran into the 0x00 null terminating byte when I was reading a command with ReadBytes. I bypassed this by using a ReadChar loop to patch together what was sent. The same issue is happening when I use the Write function...but I can't write byte by byte like I'm reading it. Right now I have a simple byte array that I then send: char _c[6]; _c[0] = 0x01; _c[1] = 0x02; _c[2] = 0x03; _c[3] = 0x00; _c[4] = 0x04; _c[5] = 0x05; tcpClient->IOHandler->Write(_c); When using WireShark, I see that the only data being sent is the first three bytes and stops at the 0x00 byte. Is Write() the correct function to use? Could an example be posted if there is another function I should be using to write? Any help would be appreciated. Thanks.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads