Skip to content

Commit 5049d8e

Browse files
committed
update md
1 parent b549572 commit 5049d8e

2 files changed

Lines changed: 160 additions & 45 deletions

File tree

README.ko.md

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# ix-sio
2+
3+
> [English](README.md)
4+
5+
- `C++` 기반의 [`socket.io`](https://socket.io/) `client`
6+
- [`IXWebSocket`](https://github.com/machinezone/IXWebSocket) 기반의 [`Socket.IO`](https://socket.io/) 클라이언트 구현체 제공
7+
- `Node.js` 기반의 `socket.io` `server` 예제
8+
9+
## 폴더 구조
10+
11+
- [`ix/`](https://github.com/JayTwoLab/ix-sio/tree/main/ix) : C++로 작성된 [`Socket.IO`](https://socket.io/) 클라이언트 구현 및 관련 소스 코드
12+
- [`main.cpp`](https://github.com/JayTwoLab/ix-sio/blob/main/ix/main.cpp) : 클라이언트 실행 예제
13+
- `SioClientBase.hpp`, `SioClientV2.hpp`, `SioClientV4.hpp` : Socket.IO 클라이언트 구현체
14+
- `CurlGlobal.hpp`, `WinSockInit.hpp` : 네트워크 초기화 관련 유틸리티
15+
- `CMakeLists.txt`, `CMakePresets.json` : CMake 빌드 설정 파일
16+
- [`sio2/`](https://github.com/JayTwoLab/ix-sio/tree/main/sio2) : [Node.js](https://nodejs.org) 기반 [`Socket.IO`](https://socket.io/) v2 서버 예제
17+
- [`server2.js`](https://github.com/JayTwoLab/ix-sio/blob/main/sio2/server2.js) : [`Socket.IO`](https://socket.io/) v2 서버 코드
18+
- `package.json` : 의존성 및 실행 스크립트
19+
- [`sio3/`](https://github.com/JayTwoLab/ix-sio/tree/main/sio3) : [Node.js](https://nodejs.org) 기반 [`Socket.IO`](https://socket.io/) v3/v4 서버 예제
20+
- [`server3.js`](https://github.com/JayTwoLab/ix-sio/blob/main/sio3/server3.js) : [`Socket.IO`](https://socket.io/) v3/v4 서버 코드
21+
- `package.json` : 의존성 및 실행 스크립트
22+
23+
## 주요 특징
24+
25+
- 다양한 버전의 Socket.IO 서버와의 호환성 테스트 가능
26+
- C++ 클라이언트와 Node.js 서버 예제 코드 제공
27+
- CMake를 이용한 손쉬운 빌드 환경
28+
29+
## 빌드 및 실행 방법
30+
31+
### `C++` 클라이언트 (`ix`)
32+
33+
- (1) CMake를 이용해 빌드
34+
```sh
35+
cd ix
36+
cmake -B build
37+
cmake --build build
38+
```
39+
- (2) 실행 파일을 통해 클라이언트 실행
40+
41+
### 의존성 설치 방법 (CURL, spdlog, nlohmann_json, ixwebsocket)
42+
43+
#### Windows (MSVC + vcpkg)
44+
45+
1. [vcpkg](https://vcpkg.io/) 설치 및 환경설정
46+
2. vcpkg로 패키지 설치:
47+
```sh
48+
vcpkg install curl spdlog nlohmann-json ixwebsocket
49+
```
50+
3. CMake 빌드 시 vcpkg toolchain 파일 지정:
51+
```sh
52+
cmake -B build -DCMAKE_TOOLCHAIN_FILE="<vcpkg-root>/scripts/buildsystems/vcpkg.cmake"
53+
cmake --build build
54+
```
55+
- `<vcpkg-root>`는 vcpkg가 설치된 경로로 교체
56+
57+
#### Linux (gcc + apt/yum)
58+
59+
- **Debian/Ubuntu (apt):**
60+
```sh
61+
sudo apt update
62+
sudo apt install libcurl4-openssl-dev libspdlog-dev nlohmann-json3-dev libixwebsocket-dev
63+
```
64+
- **Fedora (dnf):**
65+
```sh
66+
sudo dnf install libcurl-devel spdlog-devel nlohmann-json-devel
67+
```
68+
- **CentOS/RHEL (yum):**
69+
```sh
70+
sudo yum install libcurl-devel spdlog-devel nlohmann-json-devel
71+
```
72+
73+
74+
#### Rocky Linux에서 ixwebsocket 설치
75+
76+
77+
Rocky Linux 등 일부 RHEL 계열 배포판에는 `ixwebsocket-devel` 패키지가 제공되지 않습니다.
78+
이 경우, 소스에서 직접 빌드해야 합니다:
79+
80+
1. 의존성 설치
81+
```sh
82+
sudo yum install libcurl-devel spdlog-devel nlohmann-json-devel
83+
```
84+
2. IXWebSocket 소스 다운로드 및 빌드
85+
```sh
86+
git clone https://github.com/machinezone/IXWebSocket.git
87+
cd IXWebSocket
88+
mkdir build && cd build
89+
cmake ..
90+
make -j
91+
sudo make install
92+
```
93+
- 또는 특정한 릴리즈 버전을 다운로드 받아서 설치하여도 된다. https://github.com/machinezone/IXWebSocket/releases
94+
3. CMake 빌드 시 IXWebSocket이 설치된 경로가 자동으로 탐지되지 않으면, `CMAKE_PREFIX_PATH`에 설치 경로를 추가:
95+
```sh
96+
cmake -B build -DCMAKE_PREFIX_PATH="/usr/local"
97+
# 또는
98+
cmake -DCMAKE_INSTALL_PREFIX=/your/custom/path ..
99+
```
100+
101+
#### 참고
102+
- CMake에서 각 라이브러리는 `find_package`로 자동 탐지됩니다.
103+
- vcpkg/패키지 매니저를 사용하면 별도 소스 빌드 없이 간편하게 설치할 수 있습니다.
104+
105+
### `Node.js` 서버 (`sio2`, `sio3`)
106+
107+
- (1) 각 폴더(`sio2`, `sio3`)에서 의존성 설치
108+
```sh
109+
npm install
110+
```
111+
- (2) 서버 실행
112+
```sh
113+
node server2.js # 또는 node server3.js
114+
```
115+

README.md

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,58 @@
11
# ix-sio
22

3-
- `C++` 기반의 [`socket.io`](https://socket.io/) `client`
4-
- [`IXWebSocket`](https://github.com/machinezone/IXWebSocket) 기반의 [`Socket.IO`](https://socket.io/) 클라이언트 구현체 제공
5-
- `Node.js` 기반의 `socket.io` `server` 예제
3+
> [Korean](README.ko.md)
64
7-
## 폴더 구조
5+
- `C++` based [`socket.io`](https://socket.io/) `client`
6+
- Provides a [`Socket.IO`](https://socket.io/) client implementation based on [`IXWebSocket`](https://github.com/machinezone/IXWebSocket)
7+
- `Node.js` based `socket.io` `server` examples
88

9-
- [`ix/`](https://github.com/JayTwoLab/ix-sio/tree/main/ix) : C++로 작성된 [`Socket.IO`](https://socket.io/) 클라이언트 구현 및 관련 소스 코드
10-
- [`main.cpp`](https://github.com/JayTwoLab/ix-sio/blob/main/ix/main.cpp) : 클라이언트 실행 예제
11-
- `SioClientBase.hpp`, `SioClientV2.hpp`, `SioClientV4.hpp` : Socket.IO 클라이언트 구현체
12-
- `CurlGlobal.hpp`, `WinSockInit.hpp` : 네트워크 초기화 관련 유틸리티
13-
- `CMakeLists.txt`, `CMakePresets.json` : CMake 빌드 설정 파일
14-
- [`sio2/`](https://github.com/JayTwoLab/ix-sio/tree/main/sio2) : [Node.js](https://nodejs.org) 기반 [`Socket.IO`](https://socket.io/) v2 서버 예제
15-
- [`server2.js`](https://github.com/JayTwoLab/ix-sio/blob/main/sio2/server2.js) : [`Socket.IO`](https://socket.io/) v2 서버 코드
16-
- `package.json` : 의존성 및 실행 스크립트
17-
- [`sio3/`](https://github.com/JayTwoLab/ix-sio/tree/main/sio3) : [Node.js](https://nodejs.org) 기반 [`Socket.IO`](https://socket.io/) v3/v4 서버 예제
18-
- [`server3.js`](https://github.com/JayTwoLab/ix-sio/blob/main/sio3/server3.js) : [`Socket.IO`](https://socket.io/) v3/v4 서버 코드
19-
- `package.json` : 의존성 및 실행 스크립트
9+
## Folder Structure
2010

21-
## 주요 특징
11+
- [`ix/`](https://github.com/JayTwoLab/ix-sio/tree/main/ix): C++ [`Socket.IO`](https://socket.io/) client implementation and related source code
12+
- [`main.cpp`](https://github.com/JayTwoLab/ix-sio/blob/main/ix/main.cpp): Client execution example
13+
- `SioClientBase.hpp`, `SioClientV2.hpp`, `SioClientV4.hpp`: Socket.IO client implementations
14+
- `CurlGlobal.hpp`, `WinSockInit.hpp`: Network initialization utilities
15+
- `CMakeLists.txt`, `CMakePresets.json`: CMake build configuration files
16+
- [`sio2/`](https://github.com/JayTwoLab/ix-sio/tree/main/sio2): [Node.js](https://nodejs.org) based [`Socket.IO`](https://socket.io/) v2 server example
17+
- [`server2.js`](https://github.com/JayTwoLab/ix-sio/blob/main/sio2/server2.js): [`Socket.IO`](https://socket.io/) v2 server code
18+
- `package.json`: Dependencies and run scripts
19+
- [`sio3/`](https://github.com/JayTwoLab/ix-sio/tree/main/sio3): [Node.js](https://nodejs.org) based [`Socket.IO`](https://socket.io/) v3/v4 server example
20+
- [`server3.js`](https://github.com/JayTwoLab/ix-sio/blob/main/sio3/server3.js): [`Socket.IO`](https://socket.io/) v3/v4 server code
21+
- `package.json`: Dependencies and run scripts
2222

23-
- 다양한 버전의 Socket.IO 서버와의 호환성 테스트 가능
24-
- C++ 클라이언트와 Node.js 서버 예제 코드 제공
25-
- CMake를 이용한 손쉬운 빌드 환경
23+
## Key Features
2624

27-
## 빌드 및 실행 방법
25+
- Compatibility testing with various versions of Socket.IO servers
26+
- Provides C++ client and Node.js server example code
27+
- Easy build environment using CMake
2828

29-
### `C++` 클라이언트 (`ix`)
29+
## Build and Run Instructions
3030

31-
- (1) CMake를 이용해 빌드
31+
### `C++` Client (`ix`)
32+
33+
- (1) Build using CMake
3234
```sh
3335
cd ix
3436
cmake -B build
3537
cmake --build build
3638
```
37-
- (2) 실행 파일을 통해 클라이언트 실행
39+
- (2) Run the client using the executable
3840

39-
### 의존성 설치 방법 (CURL, spdlog, nlohmann_json, ixwebsocket)
41+
### Dependency Installation (CURL, spdlog, nlohmann_json, ixwebsocket)
4042

4143
#### Windows (MSVC + vcpkg)
4244

43-
1. [vcpkg](https://vcpkg.io/) 설치 및 환경설정
44-
2. vcpkg로 패키지 설치:
45+
1. Install and set up [vcpkg](https://vcpkg.io/)
46+
2. Install packages with vcpkg:
4547
```sh
4648
vcpkg install curl spdlog nlohmann-json ixwebsocket
4749
```
48-
3. CMake 빌드 시 vcpkg toolchain 파일 지정:
50+
3. Specify the vcpkg toolchain file when building with CMake:
4951
```sh
5052
cmake -B build -DCMAKE_TOOLCHAIN_FILE="<vcpkg-root>/scripts/buildsystems/vcpkg.cmake"
5153
cmake --build build
5254
```
53-
- `<vcpkg-root>`는 vcpkg가 설치된 경로로 교체
55+
- Replace `<vcpkg-root>` with your vcpkg installation path
5456

5557
#### Linux (gcc + apt/yum)
5658

@@ -68,17 +70,16 @@
6870
sudo yum install libcurl-devel spdlog-devel nlohmann-json-devel
6971
```
7072

73+
#### Installing ixwebsocket on Rocky Linux
7174

72-
#### Rocky Linux에서 ixwebsocket 설치
73-
74-
Rocky Linux 등 일부 RHEL 계열 배포판에는 `ixwebsocket-devel` 패키지가 제공되지 않습니다.
75-
이 경우, 소스에서 직접 빌드해야 합니다:
75+
Some RHEL-based distributions like Rocky Linux do not provide the `ixwebsocket-devel` package.
76+
In this case, you need to build from source:
7677

77-
1. 의존성 설치
78+
1. Install dependencies
7879
```sh
7980
sudo yum install libcurl-devel spdlog-devel nlohmann-json-devel
8081
```
81-
2. IXWebSocket 소스 다운로드 및 빌드
82+
2. Download and build IXWebSocket from source
8283
```sh
8384
git clone https://github.com/machinezone/IXWebSocket.git
8485
cd IXWebSocket
@@ -87,26 +88,25 @@ Rocky Linux 등 일부 RHEL 계열 배포판에는 `ixwebsocket-devel` 패키지
8788
make -j
8889
sudo make install
8990
```
90-
- 또는 특정한 릴리즈 버전을 다운로드 받아서 설치하여도 된다. https://github.com/machinezone/IXWebSocket/releases
91-
3. CMake 빌드 시 IXWebSocket이 설치된 경로가 자동으로 탐지되지 않으면, `CMAKE_PREFIX_PATH`에 설치 경로를 추가:
91+
- Or download and install a specific release version: https://github.com/machinezone/IXWebSocket/releases
92+
3. If CMake does not automatically detect the IXWebSocket installation path, add the install path to `CMAKE_PREFIX_PATH`:
9293
```sh
9394
cmake -B build -DCMAKE_PREFIX_PATH="/usr/local"
94-
# 또는
95+
# or
9596
cmake -DCMAKE_INSTALL_PREFIX=/your/custom/path ..
9697
```
9798

98-
#### 참고
99-
- CMake에서 각 라이브러리는 `find_package`로 자동 탐지됩니다.
100-
- vcpkg/패키지 매니저를 사용하면 별도 소스 빌드 없이 간편하게 설치할 수 있습니다.
99+
#### Notes
100+
- Each library is automatically detected with `find_package` in CMake.
101+
- Using vcpkg or a package manager allows for easy installation without building from source.
101102

102-
### `Node.js` 서버 (`sio2`, `sio3`)
103+
### `Node.js` Server (`sio2`, `sio3`)
103104

104-
- (1) 각 폴더(`sio2`, `sio3`)에서 의존성 설치
105+
- (1) Install dependencies in each folder (`sio2`, `sio3`)
105106
```sh
106107
npm install
107108
```
108-
- (2) 서버 실행
109+
- (2) Run the server
109110
```sh
110-
node server2.js # 또는 node server3.js
111+
node server2.js # or node server3.js
111112
```
112-

0 commit comments

Comments
 (0)