간단한 메세지 보내고 받는 tcp 소켓 클라이언트인데요
[code:1]#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <string.h>
#include <unistd.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#define SERVER_PORT 7890 /* 기본 포트 번호로 사용 */
int main(int argc, char *argv[])
{
int i, sfd,len, port;
struct sockaddr_in server_addr;
char *p,*r;
if(argc < 2) {
printf("usage: %s ip_address [port] [msg_len]\n", argv[0]);