Linux tsuru-no-tsurugi 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64
Apache/2.4.52 (Ubuntu)
Server IP : 192.168.0.18 & Your IP : 216.73.216.68
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
python3 /
dist-packages /
twisted /
python /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2026-06-05 06:15
_pydoctortemplates
[ DIR ]
drwxr-xr-x
2026-06-05 06:15
test
[ DIR ]
drwxr-xr-x
2026-06-05 06:15
__init__.py
598
B
-rw-r--r--
2022-02-07 22:12
_appdirs.py
820
B
-rw-r--r--
2022-02-07 22:12
_inotify.py
3.41
KB
-rw-r--r--
2022-02-07 22:12
_pydoctor.py
6.58
KB
-rw-r--r--
2022-02-07 22:12
_release.py
18.44
KB
-rw-r--r--
2022-02-07 22:12
_shellcomp.py
24.69
KB
-rw-r--r--
2022-02-07 22:12
_textattributes.py
8.88
KB
-rw-r--r--
2022-02-07 22:12
_tzhelper.py
3.05
KB
-rw-r--r--
2022-02-07 22:12
_url.py
228
B
-rw-r--r--
2022-02-07 22:12
compat.py
16.53
KB
-rw-r--r--
2022-02-07 22:12
components.py
13.87
KB
-rw-r--r--
2022-02-07 22:12
constants.py
513
B
-rw-r--r--
2022-02-07 22:12
context.py
3.96
KB
-rw-r--r--
2022-02-07 22:12
deprecate.py
27.02
KB
-rw-r--r--
2022-02-07 22:12
failure.py
26.37
KB
-rw-r--r--
2022-02-07 22:12
fakepwd.py
6.57
KB
-rw-r--r--
2022-02-07 22:12
filepath.py
52.76
KB
-rw-r--r--
2022-02-07 22:12
formmethod.py
11.82
KB
-rw-r--r--
2022-02-07 22:12
htmlizer.py
3.54
KB
-rw-r--r--
2022-02-07 22:12
lockfile.py
7.84
KB
-rw-r--r--
2022-02-07 22:12
log.py
21.78
KB
-rw-r--r--
2022-02-07 22:12
logfile.py
9.88
KB
-rw-r--r--
2022-02-07 22:12
modules.py
26.09
KB
-rw-r--r--
2022-02-07 22:12
monkey.py
2.11
KB
-rw-r--r--
2022-02-07 22:12
procutils.py
1.34
KB
-rw-r--r--
2022-02-07 22:12
randbytes.py
3.38
KB
-rw-r--r--
2022-02-07 22:12
rebuild.py
6.96
KB
-rw-r--r--
2022-02-07 22:12
reflect.py
20
KB
-rw-r--r--
2022-02-07 22:12
release.py
1.08
KB
-rw-r--r--
2022-02-07 22:12
roots.py
7.01
KB
-rw-r--r--
2022-02-07 22:12
runtime.py
5.79
KB
-rw-r--r--
2022-02-07 22:12
sendmsg.py
2.62
KB
-rw-r--r--
2022-02-07 22:12
shortcut.py
2.25
KB
-rw-r--r--
2022-02-07 22:12
syslog.py
3.57
KB
-rw-r--r--
2022-02-07 22:12
systemd.py
2.92
KB
-rw-r--r--
2022-02-07 22:12
text.py
5.29
KB
-rw-r--r--
2022-02-07 22:12
threadable.py
3.25
KB
-rw-r--r--
2022-02-07 22:12
threadpool.py
9.96
KB
-rw-r--r--
2022-02-07 22:12
twisted-completion.zsh
1.34
KB
-rw-r--r--
2022-02-07 22:12
url.py
244
B
-rw-r--r--
2022-02-07 22:12
urlpath.py
8.25
KB
-rw-r--r--
2022-02-07 22:12
usage.py
33.77
KB
-rw-r--r--
2022-02-07 22:12
util.py
26.79
KB
-rw-r--r--
2022-02-07 22:12
versions.py
273
B
-rw-r--r--
2022-02-07 22:12
win32.py
4.68
KB
-rw-r--r--
2022-02-07 22:12
zippath.py
8.82
KB
-rw-r--r--
2022-02-07 22:12
zipstream.py
9.45
KB
-rw-r--r--
2022-02-07 22:12
Save
Rename
# -*- test-case-name: twisted.test.test_sendmsg -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ sendmsg(2) and recvmsg(2) support for Python. """ from collections import namedtuple from socket import CMSG_SPACE, SCM_RIGHTS, socket as Socket from typing import List, Tuple __all__ = ["sendmsg", "recvmsg", "getSocketFamily", "SCM_RIGHTS"] ReceivedMessage = namedtuple("ReceivedMessage", ["data", "ancillary", "flags"]) def sendmsg( socket: Socket, data: bytes, ancillary: List[Tuple[int, int, bytes]] = [], flags: int = 0, ) -> int: """ Send a message on a socket. @param socket: The socket to send the message on. @param data: Bytes to write to the socket. @param ancillary: Extra data to send over the socket outside of the normal datagram or stream mechanism. By default no ancillary data is sent. @param flags: Flags to affect how the message is sent. See the C{MSG_} constants in the sendmsg(2) manual page. By default no flags are set. @return: The return value of the underlying syscall, if it succeeds. """ return socket.sendmsg([data], ancillary, flags) def recvmsg( socket: Socket, maxSize: int = 8192, cmsgSize: int = 4096, flags: int = 0 ) -> ReceivedMessage: """ Receive a message on a socket. @param socket: The socket to receive the message on. @param maxSize: The maximum number of bytes to receive from the socket using the datagram or stream mechanism. The default maximum is 8192. @param cmsgSize: The maximum number of bytes to receive from the socket outside of the normal datagram or stream mechanism. The default maximum is 4096. @param flags: Flags to affect how the message is sent. See the C{MSG_} constants in the sendmsg(2) manual page. By default no flags are set. @return: A named 3-tuple of the bytes received using the datagram/stream mechanism, a L{list} of L{tuple}s giving ancillary received data, and flags as an L{int} describing the data received. """ # In Twisted's _sendmsg.c, the csmg_space was defined as: # int cmsg_size = 4096; # cmsg_space = CMSG_SPACE(cmsg_size); # Since the default in Python 3's socket is 0, we need to define our # own default of 4096. -hawkie data, ancillary, flags = socket.recvmsg(maxSize, CMSG_SPACE(cmsgSize), flags)[0:3] return ReceivedMessage(data=data, ancillary=ancillary, flags=flags) def getSocketFamily(socket: Socket) -> int: """ Return the family of the given socket. @param socket: The socket to get the family of. """ return socket.family