| gevent-websocket. GEVENT PYWSGI ¼¹öÀÇ WebStock Çڵ鷯, Python ³×Æ®¿öÅ© ¶óÀ̺귯¸® |
Áö±Ý ´Ù¿î·Îµå |
gevent-websocket. ¼øÀ§ ¹× ¿ä¾à
- °Ô½ÃÀÚ À̸§:
- Jeffrey Gelens
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- http://www.gelens.org/
gevent-websocket. ű×
gevent-websocket. ¼³¸í
GEVENT PYWSGI ¼¹öÀÇ WebStocket 󸮱â, Python ³×Æ®¿öÅ© ¶óÀ̺귯¸® GEVENT-WebStocketÀº Jeffrey Gelens°¡ ÀÛ¼ºÇÏ°í À¯Áö °ü¸®ÇÏ´Â GEVENT ³×Æ®¿öÅ· ¶óÀ̺귯¸®¸¦À§ÇÑ WebStockible ¶óÀ̺귯¸®ÀÔ´Ï´Ù. BSD License.InstallationInstall Python 2.4 ¶Ç´Â Newer ¹× GEVENT ¹× ±× Á¾¼Ó¼ºÀ» Çã°¡¹Þ½À´Ï´Ù. ÃֽŠ¸±¸®½º´Â ¿©±â¿¡¼ ´Ù¿î·ÎµåÇϰųª ÀúÀå¼Ò¸¦ º¹Á¦ÇÏ¿© ÀúÀå¼Ò¸¦ º¹Á¦ ÇÒ ¼ö ÀÖ½À´Ï´Ù. SuSagenative GeVentat Gevent-WebStocketÀº Pywsgi GEVENT ¼¹ö¸¦ ±â¹ÝÀ¸·Î ÇÑ Çڵ鷯°¡ Çϳª ÀÖ½À´Ï´Ù. Webent import pywsgifrom geveentwebsocket.handler °¡Á® ¿À±â websockethandlerserver = pywsgi.wsgiserver = pywsgi.wsgiserver ( '127.0.0.1', 8000), websockethandler) server.serve_forever () ÀÌÈÄ 3 ¹ø° ¸Å°³ º¯¼ö¸¦ »ç¿ëÇÏ¿© WSGI ÀÀ¿ë ÇÁ·Î±×·¥À» ÀÛ¼ºÇÕ´Ï´Ù. Áï, websocket_app (environ, start_response, ws) : ws.path == '/ echo': message = ws.wait () wsend (¸Þ½ÃÁö ) Gunicornusing Gunicorn ¼¹ö¸¦ ½ÃÀÛÇϱⰡ ´õ¿í ½±½À´Ï´Ù. ÀÌÀü ¿¹Á¦ÀÇ websocket_app ¸¸ ¼¹ö¸¦ ½ÃÀÛÇÏ·Á¸é ÇÊ¿äÇÕ´Ï´Ù. ´ÙÀ½ ¸í·É ¹× ±Ù·ÎÀÚ Å¬·¡½º¸¦ »ç¿ëÇÏ´Â Dtart Gunicorn : Gunicorn -K "GEVentWebSocket.gunicorn.workers.geventWebSocketworker"Gunicorn_WebSocket : WebSocket_App ¿ä±¸ »çÇ× : ¡¤ ÆÄÀ̽ã
gevent-websocket. °ü·Ã ¼ÒÇÁÆ®¿þ¾î