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
- Stack
- bfs
- FRAGMENT
- ๊ฐ๋ฐ์
- ํ๊ณ
- socket
- Android Studio
- Data Structure
- graph
- brute-force
- reversing
- javascript
- queue
- ํด์ธ์ฌํ
- JPA
- Java
- sort
- Vo
- ์ฐ์ํ ํ ํฌ์ฝ์ค
- webhacking.kr
- git
- mysql
- C
- OneToMany
- ํ๋ก๊ทธ๋๋จธ์ค
- Android
- Algorithm
- dfs
- ์นํดํน
- ๋ฆฌ๋ฒ์ฑ
| ์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
|---|---|---|---|---|---|---|
| 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 | 29 | 30 | 31 |