- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Windows socket client drops the last byte of every...
Operating System - OpenVMS
1748195
Members
4359
Online
108759
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-18-2010 06:36 AM
тАО11-18-2010 06:36 AM
Re: Windows socket client drops the last byte of every packet
Yes but missing some byte in the middle of the stream seems unlikely.
This points to an error in the receiving application. Maybe overlapping buffers or something.
Oswald
This points to an error in the receiving application. Maybe overlapping buffers or something.
Oswald
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-18-2010 07:30 AM
тАО11-18-2010 07:30 AM
Re: Windows socket client drops the last byte of every packet
Presume that a read receives a torn "message" (as is entirely permissible within TCP) and, for grins, assume that the tear is either in front of or within the word-length length field. Or presume that the reader now gets a few bytes that didn't make it over with the previous "message" read. Where does that leave the rest of the code?
If you want to operate with the envisioned reliable datagram transport via TCP, then you get to implement your own "packet" disassembly code, and you have to look at and slide a window based on how many bytes each read has received.
This is one of various considerations and problems that arise with socket programming that have been solved before; sockets are among the oldest and most primitive and problematic interfaces. Stuff like zeromq is definitely a friend here, and that use then frees you up to add more value for your customers.
If you want to operate with the envisioned reliable datagram transport via TCP, then you get to implement your own "packet" disassembly code, and you have to look at and slide a window based on how many bytes each read has received.
This is one of various considerations and problems that arise with socket programming that have been solved before; sockets are among the oldest and most primitive and problematic interfaces. Stuff like zeromq is definitely a friend here, and that use then frees you up to add more value for your customers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-18-2010 10:21 AM
тАО11-18-2010 10:21 AM
Re: Windows socket client drops the last byte of every packet
Thanks for everyones comments. I have a better understanding of how this should work, but I do not understand why I am having a problem. I don't see any explanation in my client program when I can do a single QIOW on the server and on my first call to Receive on the client, I get the entire stream but with missing bytes. There are no more bytes to read in the stream at this point.
Having said that, I have an application that is functioning well by splitting the sent message into two separate QIOWs. I realize that this should have no bearing on what I receive, but it does. I am able to control which bytes get dropped in this manner.
Seeing no other explanation at the moment, I will call this good enough for now. Thanks, again.
Having said that, I have an application that is functioning well by splitting the sent message into two separate QIOWs. I realize that this should have no bearing on what I receive, but it does. I am able to control which bytes get dropped in this manner.
Seeing no other explanation at the moment, I will call this good enough for now. Thanks, again.
- « Previous
-
- 1
- 2
- Next »
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP