Lines Matching defs:conn
24 newClient->conn = crNetAcceptClient( cr_server.protocol, NULL,
81 client->conn->pClient = client;
82 CRVBOXHGSMI_CMDDATA_CLEANUP(&client->conn->CmdData);
87 client->number = client->conn->u32ClientID;
185 crDebug("Deleting client %p (%d msgs left)", client, crNetNumMessages(client->conn));
188 if (crNetNumMessages(client->conn) > 0) {
260 crNetFreeConnection(client->conn);
261 client->conn = NULL;
350 if (!cr_server.run_queue->client->conn
351 || (cr_server.run_queue->client->conn->type == CR_NO_CONNECTION
352 && crNetNumMessages(cr_server.run_queue->client->conn) == 0))
368 if (crNetNumMessages(cr_server.run_queue->client->conn) > 0)
383 && cr_server.run_queue->client->conn
384 && crNetNumMessages(cr_server.run_queue->client->conn) > 0)
425 static int crServerPendMsg(CRConnection *conn, const CRMessage *msg, int cbMsg)
446 RTListAppend(&conn->PendingMsgList, &pMsg->Node);
460 if (!pClient || !pClient->conn)
466 pConn = pClient->conn;
537 RTListAppend(&pClient->conn->PendingMsgList, &pMsg->Node);
550 static void crServerPendProcess(CRConnection *conn)
556 RTListForEachSafe(&conn->PendingMsgList, pIter, pNext, CR_SERVER_PENDING_MSG, Node)
588 crServerDispatchMessage(CRConnection *conn, CRMessage *msg, int cbMsg)
613 CRASSERT(cr_server.curClient && cr_server.curClient->conn && cr_server.curClient->conn->id == msg->header.conn_id);
614 cr_server.curClient->conn->opcodes_count += msg_opcodes->numOpcodes;
625 if (RTListIsEmpty(&conn->PendingMsgList))
628 if (RT_SUCCESS(crServerPendMsg(conn, msg, cbMsg)))
635 crServerPendProcess(conn);
640 if (RTListIsEmpty(&conn->PendingMsgList))
642 if (RT_SUCCESS(crServerPendMsg(conn, msg, cbMsg)))
644 Assert(!RTListIsEmpty(&conn->PendingMsgList));
654 crServerPendProcess(conn);
660 crServerPendProcess(conn);
661 Assert(RTListIsEmpty(&conn->PendingMsgList));
666 // CRASSERT(!RTListIsEmpty(&conn->PendingMsgList));
667 crServerPendProcess(conn);
668 Assert(RTListIsEmpty(&conn->PendingMsgList));
692 rc = crVBoxServerInternalClientRead(conn->pClient, (uint8_t*)pCmdData->pWriteback, &cbWriteback);
720 CRConnection *conn;
725 conn = cr_server.run_queue->client->conn;
728 while (conn && conn->type != CR_NO_CONNECTION &&
729 crNetNumMessages(conn) > 0) {
734 crNetNumMessages(conn), (void *) conn);
742 len = crNetPeekMessage( conn, &msg );
813 crServerDispatchMessage( conn, msg, len );
815 crNetFree( conn, msg );
830 if (!conn || conn->type == CR_NO_CONNECTION) {
911 crServerRecv( CRConnection *conn, CRMessage *msg, unsigned int len )