Mine is a Samsung Galaxy Note NT-5110, but I tested the following code on other Tablets with the same Result.
When I run the handler on PC, it works fine.
But when I try to accept a Connection on Android, I always receive the same Error : "Can't reuse port" !
I scanned the whole range of Ports (1 - 65 535) and the Device answer is always the same The Result ="Can't reuse port" .
I indeed checked the INERNET permission in the Android Application Permissions.
Where is my Error ?
Code: Select all
local tServerPort, tResult, tPort
put 23100 into tServerPort // or whatever port in 1-65535 range
accept connections on port tServerPort with message "newClient"
put the result into tResult
put it into tport
put "SERVER Accepting Connection on Port : " & tServerPort into fld "serverStatus"
if tResult is empty then
put return & "Open Port : "& tServerPort after fld "serverStatus"
else
// HERE is the fatal result on Tablet : can't reuse port
put return & "Error : " & tResult after fld "serverStatus"
end if