Skip to content

Commit

Permalink
Create client.h
Browse files Browse the repository at this point in the history
  • Loading branch information
shp2013 committed May 28, 2013
1 parent 5ea6893 commit 1e0ff56
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions client.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#ifndef CLIENT_H
#define CLIENT_H

#include <iostream>
#include <string>

using namespace std;

class Client
{
public:
Client();
~Client();
//send message of msg to server
bool send();

//receive reponse from server
//and output response's result
bool receive();

//get an input cmd and its arg,
//then save them to msg
bool getCmd();

//msg sending to server
char msg[1024];

//the sizeof msg
int msgSize;

//mark whether exit
bool isQuit;

private:
//check cmd
bool isEqual(char *p1,char *p2);

//
bool assgin(char *p1,char *p2,int len);

//save cmd expected
char add[4];
char delet[7];
char search[7];
char help[6];
char quit[6];
char name[5];
char number[7];
char address[8];


};

#endif

0 comments on commit 1e0ff56

Please sign in to comment.