Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: third_party/twisted_8_1/twisted/internet/iocpreactor/iocpsupport/wsasend.pxi

Issue 12261012: Remove third_party/twisted_8_1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 # Copyright (c) 2008 Twisted Matrix Laboratories.
2 # See LICENSE for details.
3
4
5 def send(long s, object buff, object obj, unsigned long flags = 0):
6 cdef int rc
7 cdef myOVERLAPPED *ov
8 cdef WSABUF ws_buf
9 cdef unsigned long bytes
10
11 PyObject_AsReadBuffer(buff, <void **>&ws_buf.buf, <int *>&ws_buf.len)
12
13 ov = makeOV()
14 if obj is not None:
15 ov.obj = <PyObject *>obj
16
17 rc = WSASend(s, &ws_buf, 1, &bytes, flags, <OVERLAPPED *>ov, NULL)
18
19 if rc == SOCKET_ERROR:
20 rc = WSAGetLastError()
21 if rc != ERROR_IO_PENDING:
22 return rc, bytes
23
24 Py_XINCREF(obj)
25 return rc, bytes
26
27
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698