Difference between revisions of "socket"
m (Some grammar edits, and swapped the lua reference to a LÖVE one.) |
|||
Line 1: | Line 1: | ||
{{newin|[[0.5.0]]|050|type=module}} | {{newin|[[0.5.0]]|050|type=module}} | ||
+ | {{notice|The current version built in LÖVE does not fully support non-blocking TCP connections on Windows}} | ||
Implements a [http://w3.impa.br/~diego/software/luasocket/ luasocket] module for TCP/UDP networking. | Implements a [http://w3.impa.br/~diego/software/luasocket/ luasocket] module for TCP/UDP networking. | ||
The luasocket module is bundled with love binary, but in order to use it, you need to require the module like this: | The luasocket module is bundled with love binary, but in order to use it, you need to require the module like this: |
Revision as of 03:51, 25 May 2017
Available since LÖVE 0.5.0 |
This module is not supported in earlier versions. |
The current version built in LÖVE does not fully support non-blocking TCP connections on Windows |
Implements a luasocket module for TCP/UDP networking. The luasocket module is bundled with love binary, but in order to use it, you need to require the module like this:
require("socket")
or even better:
local socket = require("socket")
Note: Since lua 5.2LÖVE 0.11, the latter method is preferredrecommended, as modules will no longer register themselves in the global space, instead they will return a table.
Note: When using blocking operations (network connect/read/write, or socket.sleep), the whole LÖVE main loop will be blocked, and it is usually a bad idea. So use only non-blocking operations if possible, or use it in a thread.
Reference Manual
For detailed usage, see the reference manual.
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info