'Send a command through the data connection as a fiff tag.
Parameters
command : int
The command code.
data : str
Additional data to send.'

def _send_fiff_command(self, command, data=None):

    kind = FIFF.FIFF_MNE_RT_COMMAND
    type = FIFF.FIFFT_VOID
    size = 4
    if (data is not None):
        size += len(data)
    next = 0
    msg = np.array(kind, dtype='>i4').tostring()
    msg += np.array(type, dtype='>i4').tostring()
    msg += np.array(size, dtype='>i4').tostring()
    msg += np.array(next, dtype='>i4').tostring()
    msg += np.array(command, dtype='>i4').tostring()
    if (data is not None):
        msg += np.array(data, dtype='>c').tostring()
    self._data_sock.sendall(msg)
