twisted.protocols.haproxy.test.test_v2parser module documentationtwisted.protocols.haproxy.test
Test cases for twisted.protocols.haproxy.V2Parser.
| Class | V2ParserTests | Test twisted.protocols.haproxy.V2Parserbehaviour. | 
| Function | _makeHeaderIPv6 | Construct a version 2 IPv6 header with custom bytes. | 
| Function | _makeHeaderIPv4 | Construct a version 2 IPv4 header with custom bytes. | 
| Function | _makeHeaderUnix | Construct a version 2 IPv4 header with custom bytes. | 
Construct a version 2 IPv6 header with custom bytes.
| Parameters | sig | The protocol signature; defaults to valid V2_SIGNATURE. (type:bytes) | 
| verCom | Protocol version and command.  Defaults to V2 PROXY. (type: bytes) | |
| famProto | Address family and protocol.  Defaults to AF_INET6/STREAM. (type: bytes) | |
| addrLength | Network-endian byte length of payload.  Defaults to description of default 
addrs/ports. (type: bytes) | |
| addrs | Address payload.  Defaults to ::1for source and destination. (type:bytes) | |
| ports | Source and destination ports.  Defaults to 8080 for source 8888 for 
destination. (type: bytes) | |
| Returns | A packet with header, addresses, and ports. (type: bytes) | |
Construct a version 2 IPv4 header with custom bytes.
| Parameters | sig | The protocol signature; defaults to valid V2_SIGNATURE. (type:bytes) | 
| verCom | Protocol version and command.  Defaults to V2 PROXY. (type: bytes) | |
| famProto | Address family and protocol.  Defaults to AF_INET/STREAM. (type: bytes) | |
| addrLength | Network-endian byte length of payload.  Defaults to description of default 
addrs/ports. (type: bytes) | |
| addrs | Address payload.  Defaults to 127.0.0.1 for source and destination. (type: bytes) | |
| ports | Source and destination ports.  Defaults to 8080 for source 8888 for 
destination. (type: bytes) | |
| Returns | A packet with header, addresses, and ports. (type: bytes) | |
Construct a version 2 IPv4 header with custom bytes.
| Parameters | sig | The protocol signature; defaults to valid V2_SIGNATURE. (type:bytes) | 
| verCom | Protocol version and command.  Defaults to V2 PROXY. (type: bytes) | |
| famProto | Address family and protocol.  Defaults to AF_UNIX/STREAM. (type: bytes) | |
| addrLength | Network-endian byte length of payload.  Defaults to 108 bytes for 2 null 
terminated paths. (type: bytes) | |
| addrs | Address payload.  Defaults to /home/tests/mysockets/sockfor 
source and destination paths. (type:bytes) | |
| Returns | A packet with header, addresses, and8 ports. (type: bytes) | |