lsocket: simple and easy socket support for lua
What is it?
lsocket is a library to provide socket programming support for lua. It is not intended to be a complete socket api, but easy to use and good enough for most tasks. Both IPv4 and IPv6 are supported, as are tcp and udp, and also IPv4 broadcasts and IPv6 multicasts. Also, lsocket is almost nonblocking, meaning that nothing blocks except for nameserver lookups.
What's new in version 1.4.1 (2017-03-16)
- Fixed memory leak discovered by 云风 Cloud Wu
- proper tostring method
What's new in version 1.4 (2015-04-17)
- Lua 5.3 compatibility (or rather, some cleanup in the number handling department)
- socket fd's are checked against FD_SETSIZE now in select()
- changed build type to make
- converted all documentation to markdown
- fixed bug: send and sendto would not correctly return false on timeout (patch by 云风)
- lsocket README file
- README for the experimental async_resolver library
- what has changed from version to version.
There is also a repository at https://codeberg.org/gnarz/lsocket which gets changes I make between the releases.
The lsocket module and all accompanying documentation and additional source code is released under the terms of the MIT license.
Copyright (c) 2013-2017 Gunnar Zötl
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
If you have anything to say about this, comments, bug reports, whatever, feel free to email them to