
Client code 'test.c' compile gcc test.c -o test Server code 'server.c' compile gcc server.c -o server open 2 terminal, run server, check IP by 'ifconfig'and connect client terminal_server terminal_client 서버 구동후, IP로 클라이언트에서 서버로 연결하면 클라이언트에서 입력한 문자가 서버에서 출력되는것을 확인가능. 물론, 로컬에서 실험할거면 IP대신 localhost나 127.0.0.1 때려도무관
code from Computer_Networks_Larry_Peterson_5ed #include #include #include #include #include #define SERVER_PORT 47500 #define MAX_PENDING 5 #define MAX_LINE 256 int main() { struct sockaddr_in sin; char buf[MAX_LINE]; int len; int s, new_s; /* build address data structure */ bzero((char *)&sin, sizeof(sin)); sin.sin_family = AF_INET; sin.sin_addr.s_addr = INADDR_ANY; sin.sin_port = htons(SERVER_..

code from Computer_Networks_Larry_Peterson_5ed #include #include #include #include #include #include #include #define SERVER_PORT 47500 #define MAX_LINE 256 int main (int argc, char * argv[]) { FILE *fp; struct hostent *hp; struct sockaddr_in sin; char *host; char buf[MAX_LINE]; int s; int len; if (argc==2) { host = argv[1]; } else { fprintf(stderr, "usage: simplex-talk host\n"); exit(1); } /* t..
- Total
- Today
- Yesterday
- reversing
- Algorithm
- webhacking.kr
- Stack
- Java
- socket
- 개발자
- Android Studio
- OneToMany
- git
- 리버싱
- JPA
- brute-force
- javascript
- 해외여행
- Vo
- 회고
- Data Structure
- Android
- 프로그래머스
- queue
- bfs
- mysql
- C
- dfs
- 우아한 테크코스
- sort
- graph
- FRAGMENT
- 웹해킹
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |