parameters: (self)
docstring: Read TCPROS header from active socket
          @raise TransportInitError if header fails to validate
docstring_summary: Read TCPROS header from active socket
docstring_tokens: Read TCPROS header from active socket
function: def read_header(self):
          """
          Read TCPROS header from active socket
          @raise TransportInitError if header fails to validate
          """
          sock = self.socket
          if sock is None:
              return
          sock.setblocking(1)
  	# TODO: add bytes received to self.stat_bytes
          self._validate_header(read_ros_handshake_header(sock, self.read_buff, self.protocol.buff_size))
function_tokens: def read_header ( self ) : sock = self . socket if sock is None : return sock . setblocking ( 1 ) # TODO: add bytes received to self.stat_bytes self . _validate_header ( read_ros_handshake_header ( sock , self . read_buff , self . protocol . buff_size ) )