Log In  


I was following the Picotron manual example provided under sock:accept(), found here, and whenever I use it it will invariably start detecting hundreds of new clients in that port. I have tested it in a cartridge with a counter as well to confirm that it is, in fact, hundreds of clients (around 300-500 before stopping on its own in the "listening" stage). The problem isn't just tied to the port "8899" since using any other ports will yield the same results. When my partner tested it, this didn't happen.

Furthermore, whenever this happens, I am also unable to create a socket in a different terminal. Typing in a = socket("tcp://localhost:8899") will not do anything while the listener terminal is up. Typing it in a terminal without having opened a listener will freeze up Picotron for a few seconds. In both cases, doing ?a prints nothing and doing ?a != nil prints "false".

My antivirus (Bitdefender) doesn't detect it as a threat and I've added Picotron into the allowed firewall rules, so at this point I am at a loss.



1

Yeah it does that. Each returned table is actually a socket, with :read() capability. What works for me is reading the socket, then if :status() is "invalid", close the socket. Otherwise it's a real connection and I should keep it. (This requires the connected client to send an opening message too, but it's good enough).



[Please log in to post a comment]