エントリーの編集
![loading...](https://b.st-hatena.com/bdefb8944296a0957e54cebcfefc25c4dcff9f5f/images/v4/public/common/loading@2x.gif)
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
自作したサーバープログラムをCircusで動かす - 偏った言語信者の垂れ流し
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
![アプリのスクリーンショット](https://b.st-hatena.com/bdefb8944296a0957e54cebcfefc25c4dcff9f5f/images/v4/public/entry/app-screenshot.png)
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
自作したサーバープログラムをCircusで動かす - 偏った言語信者の垂れ流し
Circusからファイルディスクリプタが渡されるのでsocket.fromfdを使えばいいらしい。 Python Pythonのバ... Circusからファイルディスクリプタが渡されるのでsocket.fromfdを使えばいいらしい。 Python Pythonのバージョンは2.7.2。 myserver.py # coding: utf-8 import sys import socket import logging import select content = """HTTP/1.0 200 OK Content-Type: text/plain Length: 13 Hello world! """ content_length = len(content) def main(): sock = socket.fromfd(int(sys.argv[1]), socket.AF_INET, socket.SOCK_STREAM) try: while True: ready, notused, notused =