User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 392,300 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,831 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser:
Views: 1616 | Replies: 2 | Solved
Reply
Join Date: Jul 2005
Location: Stone Mountain
Posts: 2
Reputation: raddad555 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
raddad555 raddad555 is offline Offline
Newbie Poster

Sending single byte data

  #1  
Jul 26th, 2005
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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2005
Location: Iceland
Posts: 104
Reputation: Alvein is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 4
Alvein's Avatar
Alvein Alvein is offline Offline
Junior Poster

Re: Sending single byte data

  #2  
Jul 26th, 2005
Originally Posted by raddad555
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....
Reply With Quote  
Join Date: Jul 2005
Location: Stone Mountain
Posts: 2
Reputation: raddad555 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
raddad555 raddad555 is offline Offline
Newbie Poster

Re: Sending single byte data

  #3  
Jul 26th, 2005
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.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum

All times are GMT -4. The time now is 9:52 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC