class TestRealSystem(_RealSystem): (source)
Implements interfaces: twisted.pair.tuntap._IInputOutputSystem
Add extra skipping logic so tests that try to create real tunnel devices on platforms where those are not supported automatically get skipped.
Method | ioctl |
Attempt an ioctl, but translate permission denied errors into SkipTest so that tests that require elevated system privileges and do not have them are skipped instead of failed. |
Method | open |
Attempt an open, but if the file is /dev/net/tun and it does not exist, translate the error into SkipTest so that tests that require platform support for tuntap devices are skipped instead of failed. |
Method | receive |
Use the platform network stack to receive a datagram sent to the given address. |
Method | send |
Use the platform network stack to send a datagram to the given address. |
Inherited from _RealSystem
:
Constant | O |
Undocumented |
Class Variable | close |
Undocumented |
Class Variable | read |
Undocumented |
Class Variable | write |
Undocumented |
twisted.pair.tuntap._RealSystem.ioctl
Attempt an ioctl, but translate permission denied errors into SkipTest
so that tests that require elevated system privileges and do not have them are skipped instead of failed.
twisted.pair.tuntap._RealSystem.open
Attempt an open, but if the file is /dev/net/tun and it does not exist, translate the error into SkipTest
so that tests that require platform support for tuntap devices are skipped instead of failed.
Use the platform network stack to receive a datagram sent to the given address.
Parameters | |
fileno:int | The file descriptor of the tunnel used to send the datagram. This is ignored because a real socket is used to receive the datagram. |
host:bytes | The IPv4 address at which the datagram will be received. |
port:int | The UDP port number at which the datagram will be received. |
Returns | |
A socket.socket which can be used to receive the specified datagram. |