void IsoServer_closeConnection(IsoServer self, IsoConnection isoConnection) { if (self->state != ISO_SVR_STATE_IDLE) { self->connectionHandler(ISO_CONNECTION_CLOSED, self->connectionHandlerParameter, isoConnection); } removeClientConnection(self, isoConnection); }
void HumanPlayer::setClientConnection( ClientConnection* c ) { if( mClientConnection != 0 ) { removeClientConnection(); } mClientConnection = c; if( mClientConnection != 0 ) { connect( mClientConnection, &ClientConnection::protoMsgReceived, this, &HumanPlayer::handleMessageFromClient ); } }