BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TidTCPClient write function - stopping at byte 0x00

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Internet Socket)
View previous topic :: View next topic  
Author Message
skoob mcallister
Guest





PostPosted: Sun Sep 21, 2008 5:12 am    Post subject: TidTCPClient write function - stopping at byte 0x00 Reply with quote



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.
Back to top
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Internet Socket) All times are GMT
Page 1 of 1

 
 


Powered by phpBB © 2001, 2006 phpBB Group
.