Api/netlib.getstring(): Difference between revisions

From Minux Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 2: Line 2:


it will verify the string with the sender, it needs to know who will be sending the string.
it will verify the string with the sender, it needs to know who will be sending the string.
timeout argument is optional, if provided acts like a timeout just as rednet.receive() does.
if no timeout is provided, listens untill it hears it's call.




Line 8: Line 13:
'''usage:'''
'''usage:'''


local temp = netlib.receive(client)
local temp = netlib.receive(client, timeout)




Line 16: Line 21:


returns false if it failed to verify
returns false if it failed to verify
returns nil if no contact was made

Latest revision as of 02:37, 14 October 2024

netlib function used to receive a string expected to arrive with "sendstring"

it will verify the string with the sender, it needs to know who will be sending the string.

timeout argument is optional, if provided acts like a timeout just as rednet.receive() does.

if no timeout is provided, listens untill it hears it's call.



usage:

local temp = netlib.receive(client, timeout)


output:

returns the string if the data was verified

returns false if it failed to verify

returns nil if no contact was made