Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the cfg_addr error on socket object #200

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
d90a8a7
Fix the cfg_addr error on socket object
shuoli84 Aug 29, 2014
ae3a840
Save current work. Now the polling can connect but flooding the service
shuoli84 Sep 5, 2014
c668d1b
Add test case for handler, change logic
shuoli84 Sep 9, 2014
783f627
Fix the ping pong for poll, add test case for heart beat
shuoli84 Sep 11, 2014
bd89d2b
Add data transfer test case, fix xhr transport block and not sending …
shuoli84 Sep 11, 2014
ac75a8c
Add binary class which encode and decode packet contains binary
shuoli84 Sep 11, 2014
7a90fc4
Port the code from socket io parser without no test yet
shuoli84 Sep 11, 2014
49cd2ae
Add test case for parser
shuoli84 Sep 11, 2014
285ff49
Add the client without test
shuoli84 Sep 11, 2014
dfac1fc
Add adapter, commit the intermidia code since I am returning the comp…
shuoli84 Sep 12, 2014
2f38f38
Add server to engine and socketio, port more code form socketio depot
Sep 14, 2014
ff9e536
Fix the test case for engine handler
Sep 14, 2014
c9b3aa4
Hook up the events, now socket can emit message event when new data c…
shuoli84 Sep 14, 2014
ca835bb
Now the socket can emit received text event
shuoli84 Sep 15, 2014
f8e12e2
Update readme
shuoli84 Sep 15, 2014
4cf36cd
Add a context dict into engine_socket to let framework set customized…
shuoli84 Sep 15, 2014
25257f7
Add context to socketio socket which stores framework related info. U…
shuoli84 Sep 17, 2014
6539f9a
Add decorator which binds socket event to class' on_<message>
shuoli84 Sep 17, 2014
eb3d93f
Add auto discover for django framework
shuoli84 Sep 18, 2014
f14948a
Add websocket transport
shuoli84 Sep 18, 2014
187878b
Use the flush_nowait on upgrade
shuoli84 Sep 18, 2014
504a7c6
Fix the decorator's listner, it should create a new instance for each…
shuoli84 Sep 18, 2014
82ebccc
Register connect and disconnect on namespace object
shuoli84 Sep 19, 2014
3f02512
Catch exception for websocket transport
shuoli84 Sep 20, 2014
1d49bec
Clean stuff from gevent_socketio which is already broken
shuoli84 Sep 20, 2014
28c7fb1
Update README.rst
shuoli84 Sep 21, 2014
05645eb
Fix the test case, remove unused code
shuoli84 Oct 9, 2014
e7c9462
Remove unused code
shuoli84 Oct 9, 2014
512df03
Clean code
shuoli84 Oct 9, 2014
4055a21
Clean code
shuoli84 Oct 9, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
This SocketIO server based on Gevent and was written by:

Jeffrey Gelens <jeffrey at noppo.pro>

Current Maintainers:
Shuo Li <[email protected]>

Alexandre Bourget <[email protected]>
John Anderson <[email protected]>

Contributors:
Denis Bilenko
Sébastien Béal
jpellerin (JP)
Philip Neustrom
Based on gevent_socketio created by:
Jeffrey Gelens <jeffrey at noppo.pro>
68 changes: 0 additions & 68 deletions CHANGELOG

This file was deleted.

25 changes: 1 addition & 24 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,24 +1 @@
Copyright (c) 2010, Noppo (Jeffrey Gelens) <http://www.noppo.pro/>
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list
of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
Neither the name of the Noppo nor the names of its contributors may be
used to endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
MIT
10 changes: 0 additions & 10 deletions MANIFEST.in

This file was deleted.

25 changes: 25 additions & 0 deletions NOTES
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
old gevent socketio

xhr polling:

The loop blocks at socket get_multiple_client_msgs, which call client_queue.get() (it passed a timeout parameter to prevent blocking forever)


websocket:

The handler handle_one_response() waits with gevent.joinall(socket.jobs)
* All jobs spawned for the socket is maintained in socket's jobs array.
(what about the timeout?)
A: The transport send_into_ws do a try except, when a WebSocketError raised, (Fllowing is wrong: it will call socket's disconnect() which kills all jobs)
(Correction: The socket will spawn a watcher, which kills all the jobs and disconnect all namespaces)
The socket has a kill method, which cleaned all resources, all jobs, disconnect all namespaces etc
BUG: The disconnect for the socket not set state as closing or closed


socketio_manage has two usages:
* hook up the request from framework to socket
This still valid in GS2, we still need a way to hook the framework's request and pass it to namespaces.
We need to pass the request to framework's application and assign the request to socket. The socket has a context (to distinguish from environ), it holds a value for framework_request.

* wait on the socket's receiver loop
This is not required since now the main loop waits on response's event, at any point that needs to end the loop, the response's end should be called.
63 changes: 13 additions & 50 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,70 +1,33 @@
Presentation
Heads up
============
This project is deprecated by [gevent_socketio2](https://github.com/shuoli84/gevent_socketio2).

.. image:: https://secure.travis-ci.org/abourget/gevent-socketio.png?branch=master

``gevent-socketio`` is a Python implementation of the Socket.IO
protocol, developed originally for Node.js by LearnBoost and then
ported to other languages. Socket.IO enables real-time web
communications between a browser and a server, using a WebSocket-like
API. One aim of this project is to provide a single ``gevent``-based
API that works across the different WSGI-based web frameworks out
there (Pyramid, Pylons, Flask, web2py, Django, etc...). Only ~3 lines
of code are required to tie-in ``gevent-socketio`` in your framework.
Note: you need to use the ``gevent`` python WSGI server to use
``gevent-socketio``.
Introduction
============

gevent_socketio2 is socketio 1.0 implementation. It based on gevent_socketio, with lots of modifications in source code to support socketio protocol 1.0. It is under heavy development, production usage is not recommended.

Technical overview
==================

Most of the ``gevent-socketio`` implementation is pure Python. There
is an obvious dependency on ``gevent``, and another on
``gevent-websocket``. There are integration examples for Pyramid, Flask,
Django and BYOF (bring your own framework!).
Depends on 'gevent', 'gevent-websocket', 'pybob', 'pyee'.

pybob provides a convinient request response class.
pyee is the EventEmitter for python. Since this is a port from socketio, there is lots logic chained by event and listener.

Documentation and References
============================

You can read the renderered Sphinx docs at:

* http://readthedocs.org/docs/gevent-socketio/en/latest/

Discussion and questions happen on the mailing list:

* https://groups.google.com/forum/#!forum/gevent-socketio

or in the Github issue tracking:

* https://github.com/abourget/gevent-socketio/issues

You can also contact the maintainer:

* https://twitter.com/#!/bourgetalexndre
* https://plus.google.com/109333785244622657612
TBD


Installation
============

You can install with standard Python methods::
TBD

pip install gevent-socketio

or from source::

git clone git://github.com/abourget/gevent-socketio.git
cd gevent-socketio
python setup.py install

For development, run instead of ``install``::

python setup.py develop

If you want to do all of that in a virtualenv, run::

virtualenv env
. env/bin/activate
python setup.py develop # or install
TODO
============

* Framework support
Loading