꾸준히 안타치기

Socket.IO 사용법 본문

iOS/서버연동

Socket.IO 사용법

글자줍기 2022. 7. 22. 03:07
반응형

https://socket.io/docs/v4/client-socket-instance/

 

The Socket instance (client-side) | Socket.IO

A Socket is the fundamental class for interacting with the server. It inherits most of the methods of the Node.js EventEmitter, like emit, on, once or off.

socket.io

Socket통신 규약은 규칙이 정해져 있다.

기다리는 측의 PC를 서버라고 하며 Port를 열고 클라이언트의 접속을 기다린다.

접속하는 클라이언트는 서버의 IP와 Port에 접속하여 통신이 연결된다.

서버와 클라이언트간의 통신은  Send, Receive의 형태로 데이터를 주고 받는다.

통신이 끝나면 close로 접속을 끊는다.

http://jkkang.net/unix/netprg/chap2/net2_1.html

 

 

반응형

'iOS > 서버연동' 카테고리의 다른 글

Moya 사용법  (0) 2023.03.05
Http Status Code  (0) 2023.03.03
ssh_exchange_identification: read: Connection reset by peer 에러 해결  (0) 2022.07.21
네트워크 연결 체크 NMNetworkMonitor  (0) 2022.05.24
Alamofire 사용법  (0) 2022.03.15
Comments