コード例 #1
0
static void svr_event(
    svr_state * ns,
    tw_bf * b,
    svr_msg * m,
    tw_lp * lp)
{
   switch (m->svr_event_type)
    {
        case REQ:
            handle_req_event(ns, b, m, lp);
            break;
        case ACK:
            handle_ack_event(ns, b, m, lp);
            break;
        case KICKOFF:
            handle_kickoff_event(ns, b, m, lp);
            break;
	case LOCAL:
	   handle_local_event(ns, b, m, lp); 
	 break;
        default:
	    printf("\n Invalid message type %d ", m->svr_event_type);
            assert(0);
        break;
    }
}
コード例 #2
0
static void svr_event(
    svr_state * ns,
    tw_bf * b,
    svr_msg * m,
    tw_lp * lp)
{

    switch (m->event_type)
    {
        case KICKOFF:
            handle_kickoff_event(ns, b, m, lp);
            break;
        default:
            assert(0);
            break;
    }
}
コード例 #3
0
static void svr_event(
    svr_state * ns,
    tw_bf * b,
    svr_msg * m,
    tw_lp * lp)
{
   switch (m->h.event_type)
    {
        case KICKOFF:
            handle_kickoff_event(ns, b, m, lp);
            break;
        case RECV:
            handle_recv_event(ns, b, m, lp);
            break;
        default:
	    printf("\n Invalid message type %d ", m->h.event_type);
            assert(0);
        break;
    }
}
コード例 #4
0
static void svr_event(
    svr_state * ns,
    tw_bf * b,
    svr_msg * m,
    tw_lp * lp)
{
    assert(m->h.magic == magic);
    switch (m->h.event_type)
    {
        case ACK:
            handle_ack_event(ns, b, m, lp);
            break;
        case KICKOFF:
            handle_kickoff_event(ns, b, m, lp);
            break;
        case LOCAL:
            handle_local_event(ns, b, m, lp);
            break;
        default:
            assert(0);
            break;
    }
}