void NetGameServer::_check_connections() { // Accept new connections if (tcp_server->is_connection_available()) { conn_mutex->lock(); NetGameServerConnection *cd = memnew( NetGameServerConnection(_get_id(), _get_secret(), tcp_server->take_connection(), this)); connections.insert(cd->id, cd); conn_mutex->unlock(); _queue_signal(SIGNAL_CLIENT_CONNECT, cd->id); } }
////////////// // delete_by_oid // k \t oidInAscii ////////////// _delete_by_oid_subtest(char* buf, istream& in, mark_base* ub) { mark_smart_ptr* x = 0; if ( strcmp(buf, "delete_by_oid") == 0 ) { oid_t id; _get_id(in, id); x = new mark_smart_ptr(ub, id); x -> remove_from_db(); delete x; } else return 1; }
_update_by_id_subtest(char* buf, istream& in, mark_base* ub) { if ( strcmp(buf, "update_by_id") == 0 ) { cout << ">>> _update_by_id_subtest" << endl; oid_t id; _get_id(in, id); _update_by_id_subtest(in, id, ub); cout << "<<< _update_by_id_subtest" << endl; return 0; } else return 1; }