有时会通过TCP接收移位的数据
我正在收到内容的包裹,其中内容不是在缓冲区的开始时,而是在Buffer的Byte 2或3处开始。有时会发生这种情况。这意味着接收到的数据都已移动。
我将缓冲区大小设置为4096字节。我正在使用Python插座的RECV方法,并正在从Siemens PLC接收数据(如果这是可能的问题来源)。
我是否错过了某些内容,或者有错误在我的程序中的某个地方?
I'm receiving packages where the content has its start not at the beggining of the buffer but at byte 2 or 3 of the buffer. That just happens sometimes. That means the received data are all shifted then.
I set the buffer size to 4096 bytes. I'm using the recv method from the Python sockets and am receving data from a Siemens PLC (if that's a possible source of issues).
Am I missing something out or has the error to be somewhere else than in my program?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论