Allows multiple clients, usually web clients or devices beihind NAT with no
direct connectivity with each other to exchange messages. Supported protocols:
RAW TCP, TLS, WebSocket and secure WebSocket. Secure connections require a
certificate file in the current directory with the name gvalkov.com.pem
.
The server automatically uses the protocol requested by the client, and falls
back to RAW if no protocol is detected. Port 81 is used by default, see
G_SOCKET::config
in g_socket.cpp.
Cube3D_devicemotion can be
used as a sample client, where one device shares its accelerometer data with
another. Browsers should display rotating cube.
g_relay<- p listen port><- c connections><- L packet length>
Command | Alternative | Description |
---|---|---|
-h | Help | |
-p | Listen port | |
-c | 1-32 | Number of connections |
-L | Packet length e.g. 1472 1405 1422 65112 65507 |
☂︎ Apple iOS, macOS
☂︎ FreeBSD
☂︎ Linux, OpenWRT
☂︎ Windows