Trying to connect to a webserver listening on UDP Socket 8888 using Lua Player Plus Vita, my lua code is as follows
Code: Select all
-- Initializing Network
Network.init()
cmd_skt = 8888
remote_ip = "xxx.xxx.xxx.xxx"
-- Checking if connection is available
if Network.isWifiEnabled() then
skt = Socket.connect(remote_ip, 8888, UDP_SOCKET)
end
-- Main loop
while true do
Graphics.initBlend()
Screen.clear()
lx, ly = Controls.readLeftAnalog()
rx, ry = Controls.readRightAnalog()
Socket.send(skt,"Say hello")
Graphics.debugPrint(5,240,"Press TRIANGLE to return to the sample selector", Color.new(255,255,255))
Graphics.termBlend()
Screen.flip()
-- Exit check
if Controls.check(Controls.read(), SCE_CTRL_TRIANGLE) then
Network.term()
break
end
end
Can anyone tell me where I'm going wrong?
Advertising