Method: Cosmos::Interface#read_interface_base
- Defined in:
- lib/cosmos/interfaces/interface.rb
#read_interface_base(data) ⇒ String
Called to read data and manipulate it until enough data is returned. The definition of ‘enough data’ changes depending on the protocol used which is why this method exists. This method is also used to perform operations on the data before it can be interpreted as packet data such as decryption. After this method is called the post_read_data method is called. Subclasses must implement this method.
436 437 438 439 440 441 |
# File 'lib/cosmos/interfaces/interface.rb', line 436 def read_interface_base(data) @read_raw_data_time = Time.now @read_raw_data = data.clone @bytes_read += data.length @raw_logger_pair.read_logger.write(data) if @raw_logger_pair end |