void QWSProtocolItem::write(QIODevice *s) {
#ifdef QWSCOMMAND_DEBUG
    if (!qwsServer)
        qDebug() << "QWSProtocolItem::write sending type " << static_cast<QWSCommand::Type>(type);
    else
        qDebug() << "QWSProtocolItem::write sending event " << (type < N_EVENTS ? eventNames[type] : "unknown");
#endif
    qws_write_command(s, type, simpleDataPtr, simpleLen, rawDataPtr, rawLen);
}
void QWSProtocolItem::write( QWSSocket *s ) {
    //qDebug( "sending type %d", type );
    qws_write_command( s, type, simpleDataPtr, simpleLen, rawDataPtr, rawLen );
}