[소스] 소켓프로그래밍(서버)
- 최초 등록일
- 2003.11.11
- 최종 저작일
- 2003.11
- 4페이지/ C언어
- 가격 1,000원
소개글
숫자게임 소켓프로그래밍 서버쪽 소스입니다.
목차
없음
본문내용
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/wait.h>
#include <time.h>
#define MYPORT 3490
#define BACKLOG 10
#define MAXDATASIZE 150
#define NUM_QUIZ 6
main()
{
int sockfd, new_fd, numbytes, msg_size; /*listen on sock_fd, new connection on new_fd*/
struct sockaddr_in my_addr;
struct sockaddr_in their_addr;
int sin_size;
char buf[MAXDATASIZE];
char msg[MAXDATASIZE];
참고 자료
없음