예제 #1
0
파일: application.c 프로젝트: VhutshiloM/CS
static int ev_handler(struct mg_connection *conn, enum mg_event ev) {
  switch (ev) {
    case MG_AUTH:     return MG_TRUE;
    case MG_REQUEST:  return send_index_page(conn);
    default:          return MG_FALSE;
  }
}
예제 #2
0
파일: upload.c 프로젝트: Adamiko/mongoose
static int ev_handler(struct mg_connection *conn, enum mg_event ev) {
  if (ev == MG_REQUEST) {
    send_index_page(conn);
    return MG_TRUE;
  } else if (ev == MG_AUTH) {
    return MG_TRUE;
  } else {
    return MG_FALSE;
  }
}