-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMySerialServer.h
44 lines (33 loc) · 1005 Bytes
/
MySerialServer.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
44
//
// Created by eizzker on 13/01/2020.
//
#ifndef MILE_STONE_2_MYSERIALSERVER_H
#define MILE_STONE_2_MYSERIALSERVER_H
#include "Server.h"
#include "ClientHandler.h"
#include "Point.h"
#include <iostream>
#include <sys/socket.h>
#include <bits/socket.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <stdio.h>
#include <stdio.h>
#include <thread>
#include <sys/socket.h>
#include <string>
#include <iostream>
#include <unistd.h>
#include <netinet/in.h>
#include <cstring>
#include <arpa/inet.h>
using namespace std;
class MySerialServer : public Server<string,string,Point> {
public:
void open(int port, CLientHandler<string,string,Point> *c); // open server with port num
// listen until accept client, than execute ClientHandler
void executeServer(CLientHandler<string,string,Point> *c, sockaddr_in address, int socketfd);
void stop(); // close server
// we need to implement protocol of comunication between client and server
};
#endif //MILE_STONE_2_MYSERIALSERVER_H