connection.c
changeset 48 b94d657a9acb
parent 29 7abf6146898e
child 77 49e0babccb23
equal deleted inserted replaced
47:63adb261de90 48:b94d657a9acb
    53 
    53 
    54     int num;
    54     int num;
    55 
    55 
    56     if (argc != 3) {
    56     if (argc != 3) {
    57         printf ("Usage: %s <ipaddr> <port>\n", argv[0]);
    57         printf ("Usage: %s <ipaddr> <port>\n", argv[0]);
    58         return EXIT_SUCCESS;
    58         return EXIT_FAILURE;
    59     }
    59     }
    60 
    60 
    61     if ((sockfd = connection (argv[1], atoi (argv[2]))) < 0) {
    61     if ((sockfd = connection (argv[1], atoi (argv[2]))) < 0) {
    62         printf ("Connection error: %s:%d\n", argv[1], atoi (argv[2]));
    62         printf ("Connection error: %s:%d\n", argv[1], atoi (argv[2]));
    63         return EXIT_FAILURE;
    63         return EXIT_FAILURE;