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

Method make_header_prefix

tests/unit/io/utils.py:205–211  ·  view source on GitHub ↗
(self, message_class, version=2, stream_id=0)

Source from the content-addressed store, hash-verified

203 return setattr(connection, self.socket_attr_name, obj)
204
205 def make_header_prefix(self, message_class, version=2, stream_id=0):
206 return bytes().join(map(uint8_pack, [
207 0xff & (HEADER_DIRECTION_TO_CLIENT | version),
208 0, # flags (compression)
209 stream_id,
210 message_class.opcode # opcode
211 ]))
212
213 def make_connection(self):
214 c = self.connection_class(DefaultEndPoint('1.2.3.4'), cql_version='3.0.1', connect_timeout=5)

Calls

no outgoing calls