code: def send(self, encoded_frame):
          
          if self.socket is not None:
              try:
                  with self.__socket_semaphore:
                      self.socket.sendall(encoded_frame)
              except Exception:
                  _, e, _ = sys.exc_info()
                  log.error("Error sending frame", exc_info=1)
                  raise e
          else:
              raise exception.NotConnectedException()
docs: :param bytes encoded_frame: