Advertising (This ad goes away for registered users. You can Login or Register)

LPP-Vita UDP Socket Issue

You have questions and can't find another subforum to ask? Go here
Locked
throwaway123
Posts: 1
Joined: Sun Oct 21, 2018 1:59 am

LPP-Vita UDP Socket Issue

Post by throwaway123 »

Hi there, wondering if anyone could help.

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

When using UDP, I get nothing out of the Vita. If I switch it to TCP it works fine, but am in real need of UDP for a project.

Can anyone tell me where I'm going wrong?
Advertising
Locked

Return to “Support”