'Stop receiving epochs.
Parameters
stop_receive_thread : bool
Stop the receive thread. Note: Other RtEpochs instances will also
stop receiving epochs when the receive thread is stopped. The
receive thread will always be stopped if stop_measurement is True.
stop_measurement : bool
Also stop the measurement. Note: Other clients attached to the
server will also stop receiving data.'

def stop(self, stop_receive_thread=False, stop_measurement=False):

    if self._started:
        self._client.unregister_receive_callback(self._process_raw_buffer)
        self._started = False
    if (stop_receive_thread or stop_measurement):
        self._client.stop_receive_thread(stop_measurement=stop_measurement)
