If you use
Code:
socket = emu.file("rwc") -- rwc for read, write, create socket:open("socket.127.0.0.1:1234") socket:read(50) -- read 50 bytes from socket socket:write(data)
you can use the built in socket support. open will either connect to a listening port or listen on the given port.
If you want a complete example you can look at the gdbstub plugin.
Edited by crazyc (11/10/17 02:05 AM)
|