Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Owo Sugiana
/
opensipkd-iso8583
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ac93356a
authored
Jul 02, 2020
by
Owo Sugiana
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Bug fixed di Windows terkait socket.MSG_DONTWAIT
1 parent
2cc21a91
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
opensipkd/tcp/client.py
opensipkd/tcp/connection.py
opensipkd/tcp/client.py
View file @
ac93356
...
@@ -8,6 +8,7 @@ class Client(Connection):
...
@@ -8,6 +8,7 @@ class Client(Connection):
Connection
.
__init__
(
self
,
conf
)
Connection
.
__init__
(
self
,
conf
)
self
.
address
=
(
conf
[
'ip'
],
conf
[
'port'
])
self
.
address
=
(
conf
[
'ip'
],
conf
[
'port'
])
self
.
request
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
self
.
request
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
self
.
request
.
setblocking
(
True
)
def
connect
(
self
):
def
connect
(
self
):
self
.
request
.
connect
(
self
.
address
)
self
.
request
.
connect
(
self
.
address
)
...
...
opensipkd/tcp/connection.py
View file @
ac93356
...
@@ -75,8 +75,7 @@ class Connection:
...
@@ -75,8 +75,7 @@ class Connection:
def
receive_raw
(
self
):
def
receive_raw
(
self
):
try
:
try
:
ready
,
_
,
_
=
select
.
select
([
self
.
request
],
[],
[],
5
)
ready
,
_
,
_
=
select
.
select
([
self
.
request
],
[],
[],
5
)
raw
=
ready
and
self
.
request
.
recv
(
raw
=
ready
and
self
.
request
.
recv
(
self
.
get_receive_size
())
or
''
self
.
get_receive_size
(),
socket
.
MSG_DONTWAIT
)
or
''
if
raw
:
if
raw
:
self
.
on_receive_raw
(
raw
)
self
.
on_receive_raw
(
raw
)
return
raw
return
raw
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment