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


Groups > comp.lang.python > #93465

Re: An asyncio example

From Marko Rauhamaa <marko@pacujo.net>
Newsgroups comp.lang.python
Subject Re: An asyncio example
Date 2015-07-03 18:14 +0300
Organization A noiseless patient Spider
Message-ID <87vbe1qnn6.fsf@elektro.pacujo.net> (permalink)
References <CACvLUangsktYPpG2gkW6yr-3zq+=t-Nkfefo6tnOU4bQX2Q++A@mail.gmail.com> <mailman.273.1435933923.3674.python-list@python.org>

Show all headers | View raw


>> 1) is there a way to close just one direction of the connection?
>
> No. SOCK_STREAM sockets are always bidirectional.

socket.shutdown(socket.SHUT_WR) does the trick.

I think the asyncio.StreamWriter.write_eof() is the high-level
equivalent.


Marko

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


Thread

Re: An asyncio example Ian Kelly <ian.g.kelly@gmail.com> - 2015-07-03 08:31 -0600
  Re: An asyncio example Marko Rauhamaa <marko@pacujo.net> - 2015-07-03 18:14 +0300
    Re: An asyncio example Ian Kelly <ian.g.kelly@gmail.com> - 2015-07-03 23:58 -0600

csiph-web