954,582 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Sending single byte data

Ok here we go:
I have to send data over TCP to a listening port, the other end has a server running expecting a login. I need to send 3 bytes 6b "k" , 16 , and 31. the equilvaltes to ku. When I send the data it is sending 5 bytes being 6b 31 36 32 32. I need it to be sent as 6b , 1F , 22. I have converted the data to be sent as byte but the other end still receives it as two bytes instead of one. I am sure its the way that I am sending it but cant figure out whats going on. I need the byte value to be 16 not two bytes of 31 and 36. I am using winsock to connect to the ports and send the data. Ideas ANYONE. :o

raddad555
Newbie Poster
2 posts since Jul 2005
Reputation Points: 10
Solved Threads: 0
 
Ok here we go: I have to send data over TCP to a listening port, the other end has a server running expecting a login. I need to send 3 bytes 6b "k" , 16 , and 31. the equilvaltes to ku. When I send the data it is sending 5 bytes being 6b 31 36 32 32. I need it to be sent as 6b , 1F , 22. I have converted the data to be sent as byte but the other end still receives it as two bytes instead of one. I am sure its the way that I am sending it but cant figure out whats going on. I need the byte value to be 16 not two bytes of 31 and 36. I am using winsock to connect to the ports and send the data. Ideas ANYONE. :o

Please post the routine that sends and the routine that receives....

Alvein
Junior Poster
104 posts since Jul 2005
Reputation Points: 12
Solved Threads: 4
 

Thanks Alevin , but I was able to fix the problem by just sending the data needed with a chr$ . Now I am working on how to display control characters which do cursor positiong etc on a DOS scrren in a text box or RichText box.

raddad555
Newbie Poster
2 posts since Jul 2005
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You