https://github.com/thisisgame/lsocket
lsocket is socket support for lua.
https://github.com/thisisgame/lsocket
Last synced: 3 months ago
JSON representation
lsocket is socket support for lua.
- Host: GitHub
- URL: https://github.com/thisisgame/lsocket
- Owner: ThisisGame
- Created: 2017-03-17T16:12:37.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-17T19:25:28.000Z (over 9 years ago)
- Last Synced: 2025-12-26T07:52:53.042Z (7 months ago)
- Language: C
- Size: 663 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# lsocket
lsocket is socket support for lua. homepage:http://tset.de/lui/index.html
# build
build lua
```
cd lua
make linux
```
copy lua to samples
```
cp lua ../lsocket-1.4.1-1/samples
```
build lsocket
```
cd lsocket-1.4.1-1
make
```
copy lsocket.so to samples
```
cp lsocket.so ./samples
```
# example
- use httpclient.lua to download webpage
```
./lua httpclient.lua http://www.baidu.com
```

- run httpserver.lua as httpserver
```
./lua httpserver.lua
```


- use testclt_tcp.lua & testsrv_tcp.lua test tcp socket
```
./lua testsrv_tcp.lua
./lua testclt_tcp.lua
```

- use testclt_udp.lua & testsrv_udp.lua test udp socket
```
./lua testsrv_udp.lua
./lua testclt_udp.lua
```

- use loginserver.lua&loginclient.lua test login
```
./lua loginserver.lua
./lua loginclient.lua
```
