Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #97011

Re: Lightwight socket IO wrapper

From Random832 <random832@fastmail.com>
Subject Re: Lightwight socket IO wrapper
Date 2015-09-22 19:52 -0400
References <mtm18o$9fm$1@dont-email.me> <mailman.37.1442754893.21674.python-list@python.org> <mtnc9q$pqs$1@dont-email.me> <mailman.12.1442794762.28679.python-list@python.org> <mtsb10$uoj$1@dont-email.me>
Newsgroups comp.lang.python
Message-ID <mailman.84.1442965978.28679.python-list@python.org> (permalink)

Show all headers | View raw


On Tue, Sep 22, 2015, at 15:45, James Harris wrote:
> "Dennis Lee Bieber" <wlfraed@ix.netcom.com> wrote in message 
> news:mailman.12.1442794762.28679.python-list@python.org...
> > On Sun, 20 Sep 2015 23:36:30 +0100, "James Harris"
> > <james.harris.1@gmail.com> declaimed the following:
> >>Receiving no bytes is taken as indicating the end of the 
> >>communication.
> >>That's OK for TCP but not for UDP so there should be a way to
> >>distinguish between the end of data and receiving an empty datagram.
> >>
> > I don't believe UDP supports a truly empty datagram (length of 0) --
> > presuming a sending stack actually sends one, the receiving stack will
> > probably drop it as there is no data to pass on to a client (there is 
> > a PR
> > at work because we have a UDP driver that doesn't drop 0-length 
> > messages,
> > but also can't deliver them -- so the circular buffer might fill with
> > undeliverable headers)
> 
> As others have pointed out, UDP implementations do seem to work with 
> zero-byte datagrams properly. Again, I would rather see that in the 
> Python documentation which is what, effectively, forms a contract that 
> we should be able to rely on.

Isn't this technically the same problem as pressing ctrl-d at a terminal
- it's not _really_ the end of the input (you can continue reading
after), but it sends the program something it will interpret as such?

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Lightwight socket IO wrapper "James Harris" <james.harris.1@gmail.com> - 2015-09-20 11:22 +0100
  Re: Lightwight socket IO wrapper Akira Li <4kir4.1i@gmail.com> - 2015-09-20 16:15 +0300
    Re: Lightwight socket IO wrapper "James Harris" <james.harris.1@gmail.com> - 2015-09-20 23:36 +0100
      Re: Lightwight socket IO wrapper Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-09-20 20:19 -0400
        Re: Lightwight socket IO wrapper Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2015-09-21 17:46 +1200
        Re: Lightwight socket IO wrapper Jorgen Grahn <grahn+nntp@snipabacken.se> - 2015-09-21 11:25 +0000
        Re: Lightwight socket IO wrapper "James Harris" <james.harris.1@gmail.com> - 2015-09-22 20:45 +0100
          Re: Lightwight socket IO wrapper Random832 <random832@fastmail.com> - 2015-09-22 19:52 -0400
            Re: Lightwight socket IO wrapper Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2015-09-23 12:47 +1200
      Re: Lightwight socket IO wrapper Chris Angelico <rosuav@gmail.com> - 2015-09-21 10:34 +1000
      Re: Lightwight socket IO wrapper Akira Li <4kir4.1i@gmail.com> - 2015-09-21 06:07 +0300
        Re: Lightwight socket IO wrapper "James Harris" <james.harris.1@gmail.com> - 2015-09-22 21:05 +0100
          Re: Lightwight socket IO wrapper Marko Rauhamaa <marko@pacujo.net> - 2015-09-23 00:00 +0300
            Re: Lightwight socket IO wrapper "James Harris" <james.harris.1@gmail.com> - 2015-09-22 22:28 +0100

csiph-web