Code:
gcc -Wall -W -ansi -pedantic  hello.c
hello.c:16: warning: return type defaults to `int'
hello.c: In function `main':
hello.c:34: warning: implicit declaration of function `inet_addr'
hello.c:52: warning: ISO C89 forbids mixed declarations and code
hello.c:57: warning: format argument is not a pointer (arg 2)
hello.c:62: warning: suggest explicit braces to avoid ambiguous `else'
hello.c:59: warning: suggest explicit braces to avoid ambiguous `else'
hello.c: In function `sendData':
hello.c:87: warning: char format, different type arg (arg 2)
hello.c:95: warning: comparison between signed and unsigned
hello.c:106: warning: control reaches end of non-void function
hello.c: In function `recvData':
hello.c:114: warning: comparison between signed and unsigned
hello.c:124: warning: comparison between signed and unsigned
1. port = (int)&argv[1];
This isn't how you convert a string to an int.
Try sscanf() or strtod()

2. scanf("%d", choice);
You've got to remember the & when using scanf, otherwise you simply trash memory you don't own.
Eg.
scanf("%d", &choice);

I suggest you use the compiler options above, and don't run code until it at least clean-compiles.