Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Iliya Manolov
neoppod
Commits
87da8390
Commit
87da8390
authored
Feb 29, 2012
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Factorise addReader calls.
parent
a870a8ef
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
neo/lib/connection.py
neo/lib/connection.py
+1
-2
No files found.
neo/lib/connection.py
View file @
87da8390
...
@@ -256,6 +256,7 @@ class BaseConnection(object):
...
@@ -256,6 +256,7 @@ class BaseConnection(object):
self
.
addr
=
addr
self
.
addr
=
addr
self
.
_handlers
=
HandlerSwitcher
(
handler
)
self
.
_handlers
=
HandlerSwitcher
(
handler
)
event_manager
.
register
(
self
)
event_manager
.
register
(
self
)
event_manager
.
addReader
(
self
)
getHandler
=
property
(
lambda
self
:
self
.
_handlers
.
getHandler
)
getHandler
=
property
(
lambda
self
:
self
.
_handlers
.
getHandler
)
getLastHandler
=
property
(
lambda
self
:
self
.
_handlers
.
getLastHandler
)
getLastHandler
=
property
(
lambda
self
:
self
.
_handlers
.
getLastHandler
)
...
@@ -381,7 +382,6 @@ class ListeningConnection(BaseConnection):
...
@@ -381,7 +382,6 @@ class ListeningConnection(BaseConnection):
BaseConnection
.
__init__
(
self
,
event_manager
,
handler
,
BaseConnection
.
__init__
(
self
,
event_manager
,
handler
,
addr
=
addr
,
connector
=
connector
)
addr
=
addr
,
connector
=
connector
)
self
.
connector
.
makeListeningConnection
(
addr
)
self
.
connector
.
makeListeningConnection
(
addr
)
self
.
em
.
addReader
(
self
)
def
readable
(
self
):
def
readable
(
self
):
try
:
try
:
...
@@ -422,7 +422,6 @@ class Connection(BaseConnection):
...
@@ -422,7 +422,6 @@ class Connection(BaseConnection):
self
.
_queue
=
[]
self
.
_queue
=
[]
self
.
_on_close
=
None
self
.
_on_close
=
None
self
.
_parser_state
=
ParserState
()
self
.
_parser_state
=
ParserState
()
event_manager
.
addReader
(
self
)
def
setOnClose
(
self
,
callback
):
def
setOnClose
(
self
,
callback
):
self
.
_on_close
=
callback
self
.
_on_close
=
callback
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment