Difference between revisions of "socket"
(add keyword field) |
|||
Line 18: | Line 18: | ||
== See Also == | == See Also == | ||
− | |||
* [[Tutorial:Networking with UDP]] | * [[Tutorial:Networking with UDP]] | ||
* [[enet]] | * [[enet]] | ||
Line 24: | Line 23: | ||
[[Category:Libraries]] | [[Category:Libraries]] | ||
{{#set:Description=Module for HTTP, TCP, and UDP networking.}} | {{#set:Description=Module for HTTP, TCP, and UDP networking.}} | ||
− | {{#set:LOVE Version=0.5.0}} | + | {{#set:LOVE Version=Any}} |
+ | {{#set:LOVE Min Version=0.5.0}} | ||
{{#set:Keyword=Networking}} | {{#set:Keyword=Networking}} | ||
== Other Languages == | == Other Languages == | ||
{{i18n|socket}} | {{i18n|socket}} |
Revision as of 23:38, 31 March 2016
Available since LÖVE 0.5.0 |
This module is not supported in earlier versions. |
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.2 the latter method is preferred, as modules will no longer register theirselves in the global space, instead returning a table. So this method is recomended.
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 nonblocking operations if possible.
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