//这是程序的大致结构,有些变量已经有值
typedef struct taskset_s
{
unsigned short valid; /* The thread of task is valid */
unsigned short idx; /* The task index */
void * data; /* The task's argument */
pthread_t thread; /* The task's thread handle */
} taskset_t;
void function_init();
{
if((sock = socket(AF_INET, SOCK_DGRAM, 0)) == -1){
DBG(L_ERR, "Create socket failed \n");
}
my_addr.sin_family = AF_INET; /* host byte order */
my_addr.sin_port = htons(PORT); /* short, network byte order */
my_addr.sin_addr.s_addr = INADDR_ANY; /* automatically fill with my IP*/
memset(&(my_addr.sin_zero), '\0', 8); /* zero the rest of the struct */