Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
shrapnel
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
shrapnel
Commits
878f963b
Commit
878f963b
authored
May 14, 2013
by
Sam Rushing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coro_socket_transport: if we're a server, record the peer address.
parent
4ac29207
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
coro/ssh/l4_transport/coro_socket_transport.py
coro/ssh/l4_transport/coro_socket_transport.py
+3
-0
No files found.
coro/ssh/l4_transport/coro_socket_transport.py
View file @
878f963b
...
@@ -38,6 +38,8 @@ class coro_socket_transport(l4_transport.Transport):
...
@@ -38,6 +38,8 @@ class coro_socket_transport(l4_transport.Transport):
# The socket
# The socket
s
=
None
s
=
None
# peer
peer
=
None
def
__init__
(
self
,
ip
=
None
,
port
=
22
,
bind_ip
=
None
,
hostname
=
None
,
sock
=
None
):
def
__init__
(
self
,
ip
=
None
,
port
=
22
,
bind_ip
=
None
,
hostname
=
None
,
sock
=
None
):
self
.
ip
=
ip
self
.
ip
=
ip
...
@@ -48,6 +50,7 @@ class coro_socket_transport(l4_transport.Transport):
...
@@ -48,6 +50,7 @@ class coro_socket_transport(l4_transport.Transport):
self
.
s
=
coro
.
make_socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
self
.
s
=
coro
.
make_socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
else
:
else
:
self
.
s
=
sock
self
.
s
=
sock
self
.
peer
=
self
.
s
.
getpeername
()
def
connect
(
self
):
def
connect
(
self
):
if
self
.
bind_ip
is
not
None
:
if
self
.
bind_ip
is
not
None
:
...
...
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