MCPcopy Index your code
hub / github.com/apache/cassandra-python-driver / write_inet

Function write_inet

cassandra/protocol.py:1482–1491  ·  view source on GitHub ↗
(f, addrtuple)

Source from the content-addressed store, hash-verified

1480
1481
1482def write_inet(f, addrtuple):
1483 addr, port = addrtuple
1484 if ':' in addr:
1485 addrfam = socket.AF_INET6
1486 else:
1487 addrfam = socket.AF_INET
1488 addrbytes = util.inet_pton(addrfam, addr)
1489 write_byte(f, len(addrbytes))
1490 f.write(addrbytes)
1491 write_int(f, port)

Callers 1

test_write_read_inetMethod · 0.90

Calls 2

write_byteFunction · 0.85
write_intFunction · 0.85

Tested by 1

test_write_read_inetMethod · 0.72