-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathclient.h
48 lines (46 loc) · 1.14 KB
/
client.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
45
46
47
48
/*
* =====================================================================================
*
* Filename: client.h
*
* Description: :x
*
* Version: 1.0
* Created: 2016-05-18 15:48:06
* Revision: none
* Compiler: gcc
*
* Author: DIMOV Theodor, DRAGOMIR Philippe
* Organization: IPL
*
* =====================================================================================
*/
#ifndef CLIENTH_H
#define CLIENTH_H
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <netdb.h>
#include <fcntl.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <time.h>
#include <signal.h>
#include "config.h"
#include "common_utils.h"
#include "cards.h"
#define PORT PORT_DIMOV
#endif
void interrupt_handler(int);
void disconnect(bool);
void refill();
void clear_cards();
void print_cards();
int calculate_score();
void receive_message(int clientSocket,char** name);
void createNickname(char *name);
void connectToServer(int *clientSocket,char* serverIP,struct hostent *he,struct sockaddr_in *serverAddress);
bool fdp_is_valid(int fdp);