TCP Network sample (non urgent)

Previous topic - Next topic

Leginus

Being unwell tonight, i didnt want to do any serious work on my game, so I have been playing around a bit (ooer)
So i decided to test the network tcp sample.

it works great on my pc with the client talking to the server fine.
I then decided to see if i could get it working on my iphone. 

I had to make my iphone the server as i couldnt type on it and this ran fine, but I couldnt connect to it from my pc.
Is there any reason for this??  I am gessing its not a port issue on the router as it worked ok on the pc (or am i wrong)

This isnt an urgent question, I just wondered if someone else had experienced this and knew what the issue was.
Serves me right for playing instead of working :)


Moru

If you ran the client and server both on the same computer it should work fine. If you run the server behind a firewall/router it should not work unless you open up the port in the firewall/router. I have no idea how an iPhone works, do you get an external IP or are you running it on the local network?

Leginus

Hi moru

Yes running the code on the same pc worked fine. The iPhone and pc are on the same wireless network though, there shouldn't have been any external ip involved (that I know of)

There maybe a better way of doing what I wanted. All I wanted to do was to see if it was possible to send data to my iPhone for e.g a word processor (text, picture files, maybe sound files). 

Moebius

It's strange (well, understandable maybe) that the networking commands behave slightly differently between devices...
Are you having any errors that your program is ignoring on the PC but perhaps not on the iPhone?  It seems passing invalid sockets on the PC didn't have any effect, whereas it made my iPod's networking crash!  (Being lazy, I just scrolled NETGETLASTERROR$() continuously to see what was going wrong...)

Are the functions for using you're iPhone as a TCP server causing any problems?  My iPod seems to be sending and receiving just fine O_O, but I haven't tested using it as a TCP server...
:offtopic: Hopefully this works though - if you can REALLY be bothered to, rather than write your own interface program you could get your program to send html to the user's browser complete with forms for uploading and downloading documents!  (Although this seems like it would actually be a lot harder than coding your own interface...)
Endless Loop: n., see Loop, Endless.
Loop, Endless: n., see Endless Loop.
- Random Shack Data Processing Dictionary

ampos

Even if you are on the same home network, the ports have to be open on windows firewall.

When I want to check something like this, I directly shutdown the windows firewall.
check my web and/or my blog :D
http://diniplay.blogspot.com (devblog)
http://www.ampostata.org
http://ampostata.blogspot.com
I own PC-Win, MacBook 13", iPhone 3G/3GS/4G and iPAC-WinCE

Leginus

Thanks for all responses guys I will play later