Can send UDP but not receive in WebOS? Anyone else getting this?

Previous topic - Next topic

Wampus

I seem to be having problems receiving UDP packets in WebOS. Sending from WebOS is fine, which I've tested as a broadcast. For some reason I can't receive them in WebOS, either as broadcasts or directed to the local network IP address of the WebOS device I have (a Palm Pre3).  :|

I've checked and double checked that the IP address and port I'm sending to is correct. My code has been well tested with broadcasting and communicating between Windows, Android and iOS. All of them are fine talking to other and can pick up UDP packets sent by WebOS. Can't send back though. Has anyone else come across this?  O_O

The only (pointless) exception is if I'm sending and receiving to localhost on the same port for both client and server. Obviously that is useless for anything.

spicypixel

I think the best way to do any networking is like this...

Client ---------------> PHP Server (SQL storage) ---- Back to ---------> Client

This works with anything obviously and saves any bizarre issues you get with mobiles on 3g or handheld devices with security layers (???) etc. I really wish I'd have done this with my AnywherePC Off applications as I got weird results with iPhone(s) regarding saying it was connected always when it clearly wasnt (as in I put mad IP's in to connect to and wait for the correct response).

Just me waffling here but I do think the web based intermediary is better than any device to device direct communication, plus it means you will never ever have any firewall issues :D

Obviously using PHP is TCP rather than UDP.
http://www.spicypixel.net | http://www.facebook.com/SpicyPixel.NET

Comps Owned - ZX.81, ZX.48K, ZX.128K+2, Vic20, C64, Atari-ST, A500.600.1200, PC, Apple Mini-Mac.

Wampus

If I understand correctly you mean avoid using a player's device/computer as a server altogether and keep servers strictly web-based. If the server didn't have to do so much in Chaos Rewhatever that would be ideal. So far I've been lucky in that my Pre3 is the only device that isn't behaving as I hoped it would (for LAN play). I guess in real-world testing and Internet play I'll hear about a lot odd issues due to mobile networking firewalls, etc. Oh joy.

spicypixel

Everything should be good on a LAN though, strange that it isn't. However if you think about it though Hamachi and TeamViewer all route their networking via a web-based server so there is never any firewall, port-forwarding or device curiosities to contend with. It just works.

Shame I guess but if we did LAN with all PC's it'd be good and possibly with just pre3's it would be too? Not that it should make a difference what the device is but you never know?

I'm definitely going the route of web-based if I need any network stuff. Out of interest have you tried sending TCP packets of data?
http://www.spicypixel.net | http://www.facebook.com/SpicyPixel.NET

Comps Owned - ZX.81, ZX.48K, ZX.128K+2, Vic20, C64, Atari-ST, A500.600.1200, PC, Apple Mini-Mac.

Wampus

Well, everything I've tried so far has all been on my home network. I haven't tried SOCK commands with TCP on WebOS yet but I have tried the NET game hosting/joining thing and found another strange thing. Initially it seems hosting a game on my Pre3 won't let other devices join, but the Pre3 can join games hosted on other devices. More testing is needed. However, the outlook is that multiplayer on WebOS might have to be a compromise, i.e. manually entering the server IP address for LAN play and players can join games hosted on other machines but not host them themselves. That's not devastating, since the free version of Chaos Rewhatsit I'm doing will be playable on everything else and even WebOS users are unlikely to only have WebOS devices to work with.

The fact I've found Windows, Android and PCs can all communicate so well with each other so far over LAN and Wifi is a credit to GLBasic. I'm going to test Mac, Linux (Mint) and Windows 8 today. Windows XP working well in a virtual machine environment.