-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathclient_main.cpp
More file actions
39 lines (33 loc) · 785 Bytes
/
client_main.cpp
File metadata and controls
39 lines (33 loc) · 785 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
/*
* =====================================================================================
*
* Filename: client_main.cpp
*
* Description:
*
* Version: 1.0
* Created: 04/02/17 14:42:59
* Revision: none
* Compiler: g++
*
* Author: Feng Jie<[email protected]>
*
* =====================================================================================
*/
#include <stdlib.h>
#include <iostream>
#include "TcpChatClient.h"
static void usage(void)
{
std::cout << "client <remote_ip> <remote_port>" << std::endl;
}
int main(int argc, char *argv[])
{
if (argc != 3) {
usage();
exit(EXIT_FAILURE);
}
TcpChatClient chatClient(argv[1], atoi(argv[2]));
chatClient.start();
return 0;
}