/**
* Copyright (C) 2008 Happy Fish / YuQing
*
* FastDFS may be copied only under the terms of the GNU General
* Public License V3, which may be found in the FastDFS source kit.
* Please visit the FastDFS Home Page http://www.csource.org/ for more detail.
**/

//tracker_nio.h

#ifndef _TRACKER_NIO_H
#define _TRACKER_NIO_H

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "fast_task_queue.h"

#ifdef __cplusplus
extern "C" {
#endif

/* 
 * Ã¿¸öÏß³ÌµÄ¹ÜµÀpipe_fds[0]µÄREADÊÂ¼þµÄ»Øµ÷º¯Êý 
 * Ã¿´Î¶ÁÈ¡Ò»¸öint±äÁ¿£¬ÊÇÐÂ½¨Á¢Á¬½ÓµÄsocketÃèÊö·û£¬Ö®ºó¼ÓÈëµ½IOÊÂ¼þ¼¯ºÏ
 * °´Í¨µÀ·Ö·¢µ½ÏàÓ¦¹¤×÷Ïß³ÌÖÐµÈ´ý¿É¶ÁÊÂ¼þ´¥·¢ºóµ÷ÓÃclient_sock_readº¯Êý½øÐÐ´¦Àí
 */
void recv_notify_read(int sock, short event, void *arg);

/* ½«·¢ËÍ±¨ÎÄµÄÊÂ¼þ¼ÓÈëµ½IOÊÂ¼þ¼¯ºÏÖÐ */
int send_add_event(struct fast_task_info *pTask);

/* ÈÎÎñ½áÊøºóµÄÇåÀíº¯Êý */
void task_finish_clean_up(struct fast_task_info *pTask);

#ifdef __cplusplus
}
#endif

#endif

