summaryrefslogtreecommitdiffstats
path: root/Modules/clinic/overlapped.c.h
diff options
context:
space:
mode:
authorAlex Grönholm <alex.gronholm@nextday.fi>2022-03-13 16:42:29 (GMT)
committerGitHub <noreply@github.com>2022-03-13 16:42:29 (GMT)
commit9f04ee569cebb8b4c6f04bea95d91a19c5403806 (patch)
treeabd4626ee19d394f35109b4cd2830d50a4a4f9d9 /Modules/clinic/overlapped.c.h
parent7e473e94a52024ac821dd2f206290423e4987ead (diff)
downloadcpython-9f04ee569cebb8b4c6f04bea95d91a19c5403806.zip
cpython-9f04ee569cebb8b4c6f04bea95d91a19c5403806.tar.gz
cpython-9f04ee569cebb8b4c6f04bea95d91a19c5403806.tar.bz2
bpo-46805: Add low level UDP socket functions to asyncio (GH-31455)
Diffstat (limited to 'Modules/clinic/overlapped.c.h')
-rw-r--r--Modules/clinic/overlapped.c.h40
1 files changed, 39 insertions, 1 deletions
diff --git a/Modules/clinic/overlapped.c.h b/Modules/clinic/overlapped.c.h
index efecd90..16d6013 100644
--- a/Modules/clinic/overlapped.c.h
+++ b/Modules/clinic/overlapped.c.h
@@ -905,4 +905,42 @@ _overlapped_Overlapped_WSARecvFrom(OverlappedObject *self, PyObject *const *args
exit:
return return_value;
}
-/*[clinic end generated code: output=ee2ec2f93c8d334b input=a9049054013a1b77]*/
+
+PyDoc_STRVAR(_overlapped_Overlapped_WSARecvFromInto__doc__,
+"WSARecvFromInto($self, handle, buf, size, flags=0, /)\n"
+"--\n"
+"\n"
+"Start overlapped receive.");
+
+#define _OVERLAPPED_OVERLAPPED_WSARECVFROMINTO_METHODDEF \
+ {"WSARecvFromInto", (PyCFunction)(void(*)(void))_overlapped_Overlapped_WSARecvFromInto, METH_FASTCALL, _overlapped_Overlapped_WSARecvFromInto__doc__},
+
+static PyObject *
+_overlapped_Overlapped_WSARecvFromInto_impl(OverlappedObject *self,
+ HANDLE handle, Py_buffer *bufobj,
+ DWORD size, DWORD flags);
+
+static PyObject *
+_overlapped_Overlapped_WSARecvFromInto(OverlappedObject *self, PyObject *const *args, Py_ssize_t nargs)
+{
+ PyObject *return_value = NULL;
+ HANDLE handle;
+ Py_buffer bufobj = {NULL, NULL};
+ DWORD size;
+ DWORD flags = 0;
+
+ if (!_PyArg_ParseStack(args, nargs, ""F_HANDLE"y*k|k:WSARecvFromInto",
+ &handle, &bufobj, &size, &flags)) {
+ goto exit;
+ }
+ return_value = _overlapped_Overlapped_WSARecvFromInto_impl(self, handle, &bufobj, size, flags);
+
+exit:
+ /* Cleanup for bufobj */
+ if (bufobj.obj) {
+ PyBuffer_Release(&bufobj);
+ }
+
+ return return_value;
+}
+/*[clinic end generated code: output=5c9b17890ef29d52 input=a9049054013a1b77]*/