I didn’t read everything yet, just took a quick look at your code. (I don’t know Python)
Why are you reading 2048 bytes?
Shouldn’t you read the header first, get the length of the package and then receive the rest?
TCP is a stream of data, you could miss data?
self.data = socketRequest.recv(2048)
From: Roeland Moors
Sent: maandag 7 maart 2016 22:07
To: 'beckhof...@googlegroups.com' <beckhof...@googlegroups.com>
Subject: RE: [beckhoff-linux] Re: ADS server implementation in python
I didn’t read everything yet, just took a quick look at your code. (I don’t know Python)
Why are you reading 2048 bytes?
Shouldn’t you read the header first, get the length of the package and then receive the rest?
TCP is a stream of data, you could miss data?
self.data = socketRequest.recv(2048)
--
You received this message because you are subscribed to the Google Groups "Beckhoff Linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beckhoff-linu...@googlegroups.com.
To post to this group, send email to beckhof...@googlegroups.com.
Visit this group at https://groups.google.com/group/beckhoff-linux.
For more options, visit https://groups.google.com/d/optout.
Accepter : after accept. New fd:7
Accepter : PID(3011) client:192.168.55.102
Accepter : before accept
Main serv: about to read
Main serv: about to select on 3
portMy fd is:-267756868
0
ADS_TCP.header.reserved: 0
ADS_TCPheader.length: 48
Index Group: f060
Index Offset: 0
Read data length: 4
Write data length: 0
Response data length: 12
Response data length: 12
Response packet length: 44
ADS_TCP.header.reserved: 0
ADS_TCPheader.length: 44 total:42
ads_io.c 170 _ADSReadByte(): recv() dedected peer shut down.
ads_io.c 261 _ADSReadPacket(): _ADSReadByte() returned: -2 (ERROR).
ads_io.c 170 _ADSReadByte(): recv() dedected peer shut down.
ads_io.c 261 _ADSReadPacket(): _ADSReadByte() returned: -2 (ERROR).
(Repeats ~2000times)
portserver: I closed my fd.
--
You received this message because you are subscribed to the Google Groups "Beckhoff Linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beckhoff-linux+unsubscribe@googlegroups.com.
To post to this group, send email to beckhoff-linux@googlegroups.com.
To post to this group, send email to beckhof...@googlegroups.com.
Visit this group at https://groups.google.com/group/beckhoff-linux.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Beckhoff Linux" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beckhoff-linux/7xd4VawY-zU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beckhoff-linux+unsubscribe@googlegroups.com.