1
# Copyright (c) 2008 Twisted Matrix Laboratories.
2
# See LICENSE for details.
5
def send(long s, object buff, object obj, unsigned long flags = 0):
9
cdef unsigned long bytes
11
PyObject_AsReadBuffer(buff, <void **>&ws_buf.buf, <int *>&ws_buf.len)
15
ov.obj = <PyObject *>obj
17
rc = WSASend(s, &ws_buf, 1, &bytes, flags, <OVERLAPPED *>ov, NULL)
19
if rc == SOCKET_ERROR:
20
rc = WSAGetLastError()
21
if rc != ERROR_IO_PENDING: