| FBA The Creator http://www.fbacreator.com/fbaforum/ |
|
| Event Handler http://www.fbacreator.com/fbaforum/viewtopic.php?f=5&t=245 |
Page 1 of 1 |
| Author: | jeancilliers [ Mon Sep 13, 2010 2:21 pm ] |
| Post subject: | Event Handler |
I wrote a piece of code in delphi where the ServerSocket receives a string from a Lua sock:send() and it replies with a serversocket.OnClientRead event that works seamlesly. Now I try a Server socket in FBA and what I don't get right is a on_client_read event handler to receive a string from a remote client. Can you actually write a onsocket event or must you poll the socket in the mainloop. Any sample code will be appreciated. I deliberately don't publish my efforts here because I clearly don't have a clue. I need 2 samples --up to here i've created a listen port now I'm stuck function OnClientConnect(socket) local remote_ip, remote_port = socket:getpeername() --already no joy here end OnDataReceive(socket, buffer) --I don't have a idea how to receive the string from the remote client end Regards Jean |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Limited https://www.phpbb.com/ |
|