Re: Accessing DataSocket Server with Python

2015-05-29 Thread Marko Rauhamaa
Chris Angelico : > Indeed. That said, though, if your writes are all smaller than one > packet, and you perfectly alternate a write and a read, a write and a > read, at both ends, then you can go a very long way without ever > running into this. Rare errors are worse than consistent errors. TCP

Re: Accessing DataSocket Server with Python

2015-05-29 Thread Grant Edwards
On 2015-05-29, Chris Angelico wrote: > On Sat, May 30, 2015 at 2:29 AM, Grant Edwards > wrote: > >> If you assume TCP read/write operations are atomic and "message" >> boundaries are preserved, your code is wrong. It will eventually >> fail. Period. > > Indeed. That said, though, if your write

Re: Accessing DataSocket Server with Python

2015-05-29 Thread Chris Angelico
On Sat, May 30, 2015 at 2:29 AM, Grant Edwards wrote: > If you assume TCP read/write operations are atomic and "message" > boundaries are preserved, your code is wrong. It will eventually > fail. Period. Indeed. That said, though, if your writes are all smaller than one packet, and you perfectl

Re: Accessing DataSocket Server with Python

2015-05-29 Thread Grant Edwards
On 2015-05-29, William Ray Wing wrote: > While that’s certainly possible in a routed network (and even then > can be overridden with the “do not fragment” bit), it won’t happen in > a LAN or self-contained instrument set-up. You don't know that. > These days, even routed networks tend to delive

Re: Accessing DataSocket Server with Python

2015-05-29 Thread Chris Angelico
On Fri, May 29, 2015 at 11:37 PM, William Ray Wing wrote: >> On May 28, 2015, at 6:17 PM, Dan Stromberg wrote: >> >> I have no idea about the protocol used by NI DataSockets, but you >> might be able to reverse engineer the protocol by using the official >> client with a sniffer. >> >> Also, be a

Re: Accessing DataSocket Server with Python

2015-05-29 Thread William Ray Wing
> On May 28, 2015, at 6:17 PM, Dan Stromberg wrote: > > I have no idea about the protocol used by NI DataSockets, but you > might be able to reverse engineer the protocol by using the official > client with a sniffer. > > Also, be aware that TCP/IP guarantees that you get the correct data in >

Re: Accessing DataSocket Server with Python

2015-05-28 Thread Dan Stromberg
I have no idea about the protocol used by NI DataSockets, but you might be able to reverse engineer the protocol by using the official client with a sniffer. Also, be aware that TCP/IP guarantees that you get the correct data in the correct order, but it doesn't guarantee anything about the sizes

Accessing DataSocket Server with Python

2015-05-27 Thread Garrone, Corrado
Dear Python Team, currently I am working on a research project for my bachelor degree. A LabVIEW application is used for current and power measurements, whereas the measured data are sent to DataSocket Server, a technology by National Instruments used for data exchange between computers and applic