[프로그래밍] 유닉스 간단한 웹서버 소스
- 최초 등록일
- 2004.06.30
- 최종 저작일
- 2004.06
- 11페이지/ 한컴오피스
- 가격 2,000원
소개글
특별한 목차는 없습니다..
전체적인 소스가 11페이지 분량으로 한글파일에 있습니다..^^*
각각의 본문은 웹서버 구축을 위한 함수와 변수들로 이루어져있고, 변수명은 알아보기 쉽게 만들어져있습니다.. 보기 쉬우실 거에여..^^*
움...필요하신분들 퍼가세여~~^^*
목차
없음
본문내용
한 C언어 파일에 모두 넣으시고 컴파일 하시면 됩니다.
#include<ctype.h>
#include<sys/types.h>
#include<sys/socket.h>
#include<netinet/in.h>
#include<fcntl.h>
#include<stdio.h>
#include<sys/stat.h>
#include<dirent.h>
#include<unistd.h>
#include<time.h>
#define BUFSIZE 1024 //버퍼사이즈
void respond(int ns,int fd); //클라이언트의 요구에 대한 처리
void dir(int ns, DIR *dp,char *command); //디렉토리 처리
void execut(int ns, char *command); //실행화일 처리
int ext(char *com); //확장자 구분
void header_send(int ns, char *types, struct stat s); //send header
void itoa(int n, char s[]); //file size
참고 자료
UNIX 시스템 프로그래밍 (홍릉과학출판사)