-
Notifications
You must be signed in to change notification settings - Fork 0
/
ConnectCommand.h
43 lines (35 loc) · 892 Bytes
/
ConnectCommand.h
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
// Created by t on 17/12/18.
//
#ifndef FLIGHTSIMULATOR_CONNECTCOMMAND_H
#define FLIGHTSIMULATOR_CONNECTCOMMAND_H
#include "Command.h"
#include <iostream>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <netdb.h>
#include <sys/socket.h>
#include <unistd.h>
#include <netinet/in.h>
#include <string.h>
#include "SymbolsTable.h"
using namespace std;
//the struct the client thread will get
struct ClientData {
string ipAddress;
int port;
SymbolsTable *symbolTable;
};
//the server thread function
void* clientThreadFunc(void* clientData);
class ConnectCommand : public Command {
string ipAddress;
int port;
SymbolsTable *symbolTable;
public:
virtual void doCommand(std::vector<string> *inputVec);
virtual void setSymbolTable(SymbolsTable *symbolTable);
virtual ~ConnectCommand(){}
};
#endif //FLIGHTSIMULATOR_CONNECTCOMMAND_H