MCPcopy Create free account
hub / github.com/apache/cassandra-python-driver / read_inet_addr_only

Function read_inet_addr_only

cassandra/protocol.py:1464–1473  ·  view source on GitHub ↗
(f)

Source from the content-addressed store, hash-verified

1462
1463
1464def read_inet_addr_only(f):
1465 size = read_byte(f)
1466 addrbytes = f.read(size)
1467 if size == 4:
1468 addrfam = socket.AF_INET
1469 elif size == 16:
1470 addrfam = socket.AF_INET6
1471 else:
1472 raise InternalError("bad inet address: %r" % (addrbytes,))
1473 return util.inet_ntop(addrfam, addrbytes)
1474
1475
1476def read_inet(f):

Callers 2

read_error_code_mapFunction · 0.85
read_inetFunction · 0.85

Calls 3

read_byteFunction · 0.85
InternalErrorClass · 0.85
readMethod · 0.80

Tested by

no test coverage detected