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


Groups > comp.lang.python > #84612

Re: HTTP over Asynchronous AF_UNIX Socket in python

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!bcyclone05.am1.xlned.com!bcyclone05.am1.xlned.com!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <torriem+gmail@torriefamily.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.051
X-Spam-Evidence '*H*': 0.90; '*S*': 0.00; 'socket': 0.07; 'http': 0.09; 'implemented.': 0.09; 'python': 0.11; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'steep': 0.16; 'twisted': 0.16; 'underlying': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; 'byte': 0.24; 'fairly': 0.24; 'header :In-Reply-To:1': 0.27; 'am,': 0.29; 'unix': 0.29; 'url:client': 0.31; 'framework': 0.33; 'problem': 0.35; 'but': 0.35; 'accessing': 0.36; 'url:org': 0.36; 'message-id:@gmail.com': 0.38; 'server': 0.38; 'to:addr:python-list': 0.38; 'fact': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'easy': 0.60; 'you.': 0.62; 'show': 0.63; 'connecting': 0.64; 'charset:windows-1252': 0.65; 'bottom': 0.67; 'flexible,': 0.84; 'subject:over': 0.84; 'url:latest': 0.91
X-Virus-Scanned amavisd-new at torriefamily.org
Date Mon, 26 Jan 2015 10:42:40 -0700
From Michael Torrie <torriem@gmail.com>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0
MIME-Version 1.0
To python-list@python.org
Subject Re: HTTP over Asynchronous AF_UNIX Socket in python
References <abcd1234abc123ab12a0000074868000020000001052@gmail.com>
In-Reply-To <abcd1234abc123ab12a0000074868000020000001052@gmail.com>
Content-Type text/plain; charset=windows-1252
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.18154.1422294177.18130.python-list@python.org> (permalink)
Lines 16
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1422294177 news.xs4all.nl 2887 [2001:888:2000:d::a6]:59193
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 3288
X-Received-Body-CRC 1866704965
Xref csiph.com comp.lang.python:84612

Show key headers only | View raw


On 01/26/2015 06:32 AM, Norah Jones wrote:
> Now my problem is the HTTP request which to be sent must go through
> AF_UNIX socket. 

The Python Twisted framework may be of use to you.  It's got a very
steep learning curve, but it's fairly easy to change the underlying byte
transport for any protocol they have implemented. In fact in the Twisted
docs, they show a web client accessing an HTTP server over a unix socket
(scroll down to the bottom of the page):

http://twisted.readthedocs.org/en/latest/web/howto/client.html

They show a client connecting to a Docker server which is speaking HTTP
over a unix socket.

Twisted is very powerful and flexible, and event-driven.

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


Thread

Re: HTTP over Asynchronous AF_UNIX Socket in python Michael Torrie <torriem@gmail.com> - 2015-01-26 10:42 -0700

csiph-web