File tree 3 files changed +14
-33
lines changed
3 files changed +14
-33
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,17 @@ namespace qml {
149
149
}
150
150
delete socket_file;
151
151
}
152
+ void Client::printHelp () {
153
+ if (com[0 ] == " send" ) {
154
+ std::cout << " send -[] filename" << std::endl;
155
+ std::cout << " usage:" << std::endl;
156
+ std::cout << " -al 算数编码" << std::endl;
157
+ std::cout << " -ar 自适应算数编码" << std::endl;
158
+ std::cout << " -lz lz算法" << std::endl;
159
+ std::cout << " -rl rle编码" << std::endl;
160
+ std::cout << " -hf 哈夫曼编码" << std::endl;
161
+ }
162
+ }
152
163
void Client::handle () {
153
164
bzero (cmd ,sizeof cmd);
154
165
std::cout << " ->" ;
@@ -166,6 +177,8 @@ namespace qml {
166
177
break ;
167
178
} else if (com[0 ] == " cls" ) {
168
179
system (" clear" );
180
+ } else if (com[1 ] == " ?" ) {
181
+ printHelp ();
169
182
} else {
170
183
SendCom ();
171
184
}
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ namespace qml{
22
22
void SendFile ();
23
23
void Send_txt (Encode* en);
24
24
void SendCom ();
25
+ void printHelp ();
25
26
26
27
private:
27
28
Socket* socket_com;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments