Questions tagged [luasocket]

LuaSocket is a Lua extension library that helps to add support for functionality commonly needed by applications that deal with the Internet. It provides easy access to TCP, UDP, DNS, SMTP, FTP, HTTP, MIME and more.

LuaSocket is a extension library that is composed by two parts: a C core that provides support for the TCP and UDP transport layers, and a set of Lua modules that add support for functionality commonly needed by applications that deal with the Internet.

Author: Diego Nehab

The core support has been implemented so that it is both efficient and simple to use. It is available to any Lua application once it has been properly initialized by the interpreter in use. The code has been tested and runs well on several Windows and Unix platforms.

Among the support modules, the most commonly used implement the SMTP (sending e-mails), HTTP (WWW access) and FTP (uploading and downloading files) client protocols. These provide a very natural and generic interface to the functionality defined by each protocol. In addition, you will find that the MIME (common encodings), URL (anything you could possible want to do with one) and LTN12 (filters, sinks, sources and pumps) modules can be very handy.

Useful Links

178 questions
0
votes
1 answer

Error requiring luasocket on socket.core file installed through Luarocks on Windows

System configuration: OS: Windows 7 x64 lua -v Lua 5.1.4 luarocks -v 2.2.0beta1 luarocks list luasocket 3.0rc1-1 (installed) - C:/Program Files (x86)/LuaRocks/systree/lib/luarocks/rocks luarocks show luasocket LuaSocket 3.0rc1-1 -…
Zequez
  • 3,399
  • 2
  • 31
  • 42
0
votes
1 answer

Downloading web page using lua socket http.request

I am using the following command: print(h.request([[http://www.amved.com/milindsweb/tableDB.html]])) But all I get is this:
pageok
200 table: 0092BD00 HTTP/1.1 200 OK But the…
Milind
  • 415
  • 8
  • 24
0
votes
1 answer

How can i use LuaSec for sending in HTTPS

In my script, i use the library LuaSocket to send a XML-code. This works fine with the following code: local request_body = (XMLHeader..XMLBody); local response_body = {} local res, code, response_headers = socket.http.request { url =…
Mark Munsterman
  • 169
  • 1
  • 3
  • 11
0
votes
1 answer

Lua socket error on connection

I'm trying to make a http get, using Lua Socket: local client = socket.connect('warm-harbor-2019.herokuapp.com',80) if client then client:send("GET /get_tweets HTTP/1.0\r\n\r\n") s, status, partial = client:receive(1024) end end I…
Matheus Lima
  • 2,103
  • 3
  • 31
  • 49
0
votes
1 answer

Interacting my lua app (LuaSocket) with my socket.io chat example server

I am writing an app for Corona SDK (Using LuaSocket) to be able to subscribe and post messages to the example chat server that runs in socket.io (using gevent-websocket 0.9). I have checked that chat.js on the server interacts with ther server like…
Matheus Frik
  • 835
  • 7
  • 10
0
votes
2 answers

Lua Socket Connection For Corona SDK

Does Anyone know how to use Lua Sockets for Corona sdk, i want to pass API to the server using the device and Receives data back from the server to the device. I only find http://appcodingeasy.com/Gideros-Mobile/Using-LuaSocket-in-Gideros and it is…
Vincent
  • 852
  • 6
  • 29
  • 67
0
votes
1 answer

socket send throws timeout error

I have a proxy client between two servers. The main server S1 is on the internet. The proxy client and the second server S2 sit in the same intranet. I have the following code (parts left out for simplicity) which is responsible for forwarding data…
nakiya
  • 14,063
  • 21
  • 79
  • 118
0
votes
2 answers

How to telnet an address?

I'm trying to understand the socket class and i'm using the following example to implement a server sample local server = assert(socket.bind("*", 0)) -- find out which port the OS chose for us local ip, port = server:getsockname() -- print a…
briba
  • 2,857
  • 2
  • 31
  • 59
0
votes
1 answer

Luasocket irc check to receive message

I am trying to use luasocket to connect to an Irc channel and send and receive messages within my game (Wolfenstein Enemy Territory, If that helps). Right now I am able to do all of that, with one problem. Once I set it to listen for a message, it…
Zelly
  • 19
  • 1
  • 6
0
votes
1 answer

Luarocks breaks after installing luasocket

Running Arch Linux here, lua version is 5.1, luarocks 2.0.12 After running luarocks install luasocket I can't install any more packages. The error message I'm seeing is Warning: Failed searching manifest: Failed loading manifest: Failed fetching…
user500944
0
votes
1 answer

LuaSocket requires superuser to create server

When I try to create a socket listening on any port using LuaSocket on Ubuntu, the creation of the socket fails with "permission denied": require("socket") server, msg = socket.bind("*", 23) if not server then print(msg) end however, when the…
Henrik Ilgen
  • 1,879
  • 1
  • 17
  • 35
-1
votes
1 answer

How do I use 'Send' in Roblox's Private Messages Web API?

I've been here trying to send a message with luasocket and it had some problems, being 403: Token Validation Failed and 401: Authorization has been denied for this request. local socket = require'socket.http' local json =…
-1
votes
1 answer

How to easily host a WAN server purely for testing

I'm working on a 2D top-down multiplayer game, and though I have thoroughly tested it on my LAN network, I would like to distribute it to some friends accross the world so they can test it too. I have read a few topics on hosting WAN servers but…
1 2 3
11
12