-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConnectCommand.h
More file actions
40 lines (33 loc) · 823 Bytes
/
Copy pathConnectCommand.h
File metadata and controls
40 lines (33 loc) · 823 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
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* File: ConnectCommand.h
* Author: idox
*
* Created on December 21, 2018, 8:46 PM
*/
#ifndef PROJECTPART1_CONNECTCOMMAND_H
#define PROJECTPART1_CONNECTCOMMAND_H
#include "Command.h"
#include <stdio.h>
#include <stdlib.h>
#include <netdb.h>
#include <sys/socket.h>
#include <unistd.h>
#include <netinet/in.h>
#include "DataSender.h"
#include <string.h>
using namespace std;
/**
* Connect command execution connects a given data sender to a given ip and port.
*/
#define JUMP_CONNECT_INDEX 3
class ConnectCommand: public Command{ //OR command expression?
DataSender* dataSender;
// SymbolTable* symbolTable;
string ip;
string port;
public:
ConnectCommand(string, string, DataSender*);
~ConnectCommand() = default;
int virtual execute();
};
#endif //PROJECTPART1_CONNECTCOMMAND_H