[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: A lightweight HTTPS library for Lua?
- From: Paul Merrell <marbux@...>
- Date: Sat, 4 Jun 2022 01:17:50 -0700
We embed a light http library by Steve Kemp. Details in the attachment, exported from the NoteCase Pro Help file.
Best regards,
Paul
--
[Notice not included in the above original message: The U.S. National Security Agency neither confirms nor denies that it intercepted this message.]
¯\_(ツ)_/¯
Title: Network Commands
net.accept
Command
int net.accept(int nSocket)
Command returns the incoming connection socket using the socket that listens on some TCP/IP port.
Parameters:
nSocket -- number of the socket that accepts connections (listening socket)
Usage Examples
[To be added later.]
Command usage is also illustrated in the following sample scripts:
Command has not yet been used in a sample script.
Command History
Command was introduced in v. 3.4.2.
net.bind
Command
int net.bind(int nPort)
Command creates the socket bound to some TCP/IP port (listening socket).
Parameters:
nPort -- number of the port
Usage Examples
[To be added later.]
Command usage is also illustrated in the following sample scripts:
Command has not yet been used in a sample script.
Command History
Command was introduced in v. 3.4.2.
net.close
Command
net.close(int nSocket)
Command closes the TCP/IP socket.
Parameters:
nSocket -- socket number
Usage Examples
[To be added later.]
Command usage is also illustrated in the following sample scripts:
43_HttpTest.lua
Command History
Command was introduced in v. 3.4.2.
net.connect
Command
int net.connect(string strHost, int nPort)
Command establishes outgoing connection to the specified host/port and returns the TCP/IP socket of the connection.
Parameters:
strHost -- host name or IP string (e.g. "www.notecasepro.com")
nPort -- port number (e.g. 80)
Usage Examples
[To be added later.]
Command usage is also illustrated in the following sample scripts:
43_HttpTest.lua
Command History
Command was introduced in v. 3.4.2.
net.read
Command
int, string net.read(int nSocket, int nTimeout)
Command reads up to a 4kB of data from the socket and returns the data size and the data itself.
You can call this command multiple times (in a loop) to fetch more than 4kB of data.
Parameters:
nSocket – connection socket number
nTimeout – connection timeout in milliseconds
Usage Examples
[To be added later.]
Command usage is also illustrated in the following sample scripts:
43_HttpTest.lua
Command History
Command was introduced in v. 3.4.2.
Additional parameter nTimeout was introduced in v. 3.6.1
net.write
Command
net.write(int nSocket, string strData [, int nDataSize])
Command writes specified data to the socket.
Parameters:
nSocket -- connection socket number
strData -- data string
nDataSize -- optional size of data string (if you want to send less than the whole string)
Usage Examples
[To be added later.]
Command usage is also illustrated in the following sample scripts:
43_HttpTest.lua
Command History
Command was introduced in v. 3.4.2.