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
b7b4b087
Commit
b7b4b087
authored
Mar 13, 2013
by
Sam Rushing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
various socket write functions need "except -1"
parent
2e46a084
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
coro/socket.pxd
coro/socket.pxd
+5
-5
coro/socket.pyx
coro/socket.pyx
+5
-5
No files found.
coro/socket.pxd
View file @
b7b4b087
...
...
@@ -169,11 +169,11 @@ cdef public class sock [ object sock_object, type sock_type ]:
cpdef
object
recvfrom
(
self
,
int
buffer_size
,
int
flags
=
?
)
cpdef
bytes
recv_exact
(
self
,
int
bytes
)
cpdef
readv
(
self
,
list
size_list
)
cpdef
int
send
(
self
,
bytes
data
)
cpdef
int
sendto
(
self
,
bytes
data
,
address
,
int
flags
=
?
)
cpdef
int
sendall
(
self
,
bytes
data
)
cpdef
int
write
(
self
,
bytes
data
)
cpdef
int
writev
(
self
,
list
data
)
cpdef
int
send
(
self
,
bytes
data
)
except
-
1
cpdef
int
sendto
(
self
,
bytes
data
,
address
,
int
flags
=
?
)
except
-
1
cpdef
int
sendall
(
self
,
bytes
data
)
except
-
1
cpdef
int
write
(
self
,
bytes
data
)
except
-
1
cpdef
int
writev
(
self
,
list
data
)
except
-
1
# XXX is there a cpython.type for buffer objects?
IF
False
:
cpdef
recv_into
(
self
,
buffer
,
int
nbytes
=
?
,
int
flags
=
?
)
...
...
coro/socket.pyx
View file @
b7b4b087
...
...
@@ -279,7 +279,7 @@ cdef public class sock [ object sock_object, type sock_type ]:
else
:
raise_oserror
()
cpdef
int
send
(
self
,
bytes
data
):
cpdef
int
send
(
self
,
bytes
data
)
except
-
1
:
"""Send data on the socket.
This will repeatedly call write to ensure all data has been sent. This
...
...
@@ -319,21 +319,21 @@ cdef public class sock [ object sock_object, type sock_type ]:
if
left
==
0
:
return
sent
cpdef
int
sendall
(
self
,
bytes
data
):
cpdef
int
sendall
(
self
,
bytes
data
)
except
-
1
:
"""Send all data.
This is an alias for the :meth:`send` method.
"""
return
self
.
send
(
data
)
cpdef
int
write
(
self
,
bytes
data
):
cpdef
int
write
(
self
,
bytes
data
)
except
-
1
:
"""Write data.
This is an alias for the :meth:`send` method.
"""
return
self
.
send
(
data
)
cpdef
int
sendto
(
self
,
bytes
data
,
address
,
int
flags
=
0
):
cpdef
int
sendto
(
self
,
bytes
data
,
address
,
int
flags
=
0
)
except
-
1
:
"""Send data to a specific address.
:param data: The data to send.
...
...
@@ -614,7 +614,7 @@ cdef public class sock [ object sock_object, type sock_type ]:
finally
:
PyMem_Free
(
iov
)
cpdef
int
writev
(
self
,
list
data
):
cpdef
int
writev
(
self
,
list
data
)
except
-
1
:
"""Write a vector array of data.
This will repeatedly call writev until all data is sent. If it is
...
...
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