-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcore.h
More file actions
27 lines (27 loc) · 672 Bytes
/
Copy pathcore.h
File metadata and controls
27 lines (27 loc) · 672 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//
// Created by 邱俣涵 on 2021/10/4.
//
#ifndef FTP_SERVER_CORE_H
#define FTP_SERVER_CORE_H
#include <sys/socket.h>
#include <netinet/in.h>
#include <unistd.h>
#include <errno.h>
#include <ctype.h>
#include <string.h>
#include <memory.h>
#include <stdio.h>
#include <pthread.h>
#include <unistd.h>
#include <signal.h>
#include "command.h"
#define LISTENPORT 21
#define MAX_CONNECTION 2
typedef struct ServerParams{
int argc;
int* argv;
}ServerParams;
void* init_server(void* args);//set,bind,and start to listen
void* main_process(void* args);//Every user has one
int handle_command(User *user, char* sentence);//Handle the command
#endif //FTP_SERVER_CORE_H