equal
deleted
inserted
replaced
|
1 // Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // tcp_server |
|
15 // System Includes |
|
16 // |
|
17 // |
|
18 |
|
19 #include <stdio.h> |
|
20 #include <stdlib.h> |
|
21 |
|
22 |
|
23 /*************************************************************************************** |
|
24 * |
|
25 * Local Includes |
|
26 * |
|
27 **************************************************************************************/ |
|
28 #include "CTcpServer.h" |
|
29 |
|
30 |
|
31 /*************************************************************************************** |
|
32 * |
|
33 * Prototypes |
|
34 * |
|
35 **************************************************************************************/ |
|
36 void usage(); |
|
37 |
|
38 /*************************************************************************************** |
|
39 * |
|
40 * main() |
|
41 * |
|
42 **************************************************************************************/ |
|
43 int main(int argc, char* argv[]) |
|
44 { |
|
45 char *local_interface = NULL; |
|
46 char *local_port = NULL; |
|
47 CTcpServer tcp_server; |
|
48 |
|
49 // check params |
|
50 if( argc < 3 ) { |
|
51 usage(); |
|
52 return E_INCORRECTARG; |
|
53 } |
|
54 |
|
55 // start the server |
|
56 tcp_server.StartServer( argv[1], argv[2] ); |
|
57 return ITS_OK; |
|
58 } |
|
59 |
|
60 |
|
61 // |
|
62 // Print Usage. |
|
63 // |
|
64 void usage() |
|
65 { |
|
66 fprintf( stderr, "tcp_server <local_interface> <local_port>\n" ); |
|
67 } |