[프로그래밍] 소켓프로그래밍(클라이언트)
- 최초 등록일
- 2003.11.11
- 최종 저작일
- 2003.11
- 4페이지/ C언어
- 가격 1,000원
목차
없음
본문내용
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <netdb.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <sys/socket.h>
#define PORT 3490 /* the port client will be connecting to */
#define MAXDATASIZE 150 /* max number of bytes we can get at once */
int main(int argc, char *argv[])
{
int sockfd, numbytes,count = 10;
char ans[3];
char buf[MAXDATASIZE];
char msg[MAXDATASIZE];
struct hostent *he;
struct sockaddr_in their_addr; /* connector's address information */
참고 자료
없음