- 송수신 데이터를 구현하는 기본 단위
| LAN NIC( Network Interfare Card) | IP (Internet Protocol) | TCP (가상회선) (연결형) | SMPT(simple mail protocol) pop3 telnet FTP(File Transport Protocol) |
| UDP (Datagram) (비연결) | FTP(File Transport Protocol) game http | ||
| OSI 1,2 Layer | 3Layer | 4Layer | 5,6,7Layer |
다른 컴퓨터와 통신 시
- IP Adress → Protocol → Port
- Protocol을 일치시켜야함
Port
- Well Known Port(ex) - HTTP(80)
#include <.h> //표준 제공 라이브러리
#include ".h" //사용자 생성 라이브러리
//basic lib in socket
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/socket.h>
struct student{//기본 자료형을 확장
char *name;//기본 자료형은 제한적
int s_number;
}
gcc fileName.c -o fileName
./fileName
./byte_order
1792
1792인 이유 0000 0111 0000 0000
0000 0111 = 7
IPAdd로 직접 진입하는 경우 로드밸런싱 단계에서 접근을 막을수도 있음
Segmentation fault : 포인터가 주소값을 찾아갔을때 데이터가 없을때
'네트워크' 카테고리의 다른 글
| 서브넷 (0) | 2025.06.04 |
|---|---|
| 통신방식 (0) | 2025.06.04 |
| 네트워크 통신 방식 (0) | 2024.11.17 |