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

Side by Side Diff: third_party/twisted_8_1/twisted/internet/iocpreactor/iocpsupport/connectex.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 connect(long s, object addr, object obj):
6 cdef int family, rc
7 cdef myOVERLAPPED *ov
8 cdef sockaddr name
9
10 if not have_connectex:
11 raise ValueError, 'ConnectEx is not available on this system'
12
13 family = getAddrFamily(s)
14 if family == AF_INET:
15 fillinetaddr(<sockaddr_in *>&name, addr)
16 else:
17 raise ValueError, 'unsupported address family'
18 name.sa_family = family
19
20 ov = makeOV()
21 if obj is not None:
22 ov.obj = <PyObject *>obj
23
24 rc = lpConnectEx(s, &name, sizeof(name), NULL, 0, NULL, <OVERLAPPED *>ov)
25
26 if not rc:
27 rc = WSAGetLastError()
28 if rc != ERROR_IO_PENDING:
29 return rc
30
31 # operation is in progress
32 Py_XINCREF(obj)
33 return rc
34
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698