[ Login | Register ]

The Shining Source

« previous next »
Pages: [1] Print
Socket Problems   (Read 18369 times)
Old Post September 22, 2004, 03:21:53 pm
#1
Job
Shining Light *

Posts: 230

Logged
Socket Problems
I've been hard at work lately trying to make use of Flash's XMLSocket object. It needs an XML Socket server running at the server that listens in at a specific port. So i created a very simple socket server, using .NET, that echoes back any information sent by flash.
In my machine at home this works perfectly (though i have to disable my firewall). At brinkster flash can't connect to the desired port, though the socket server works fine (a server working inside a server, imagine that Tongue). The problem i imagine is that their firewall prevents flash from connecting to a port.
So i've bothered the support people at brinkster with this and asked them if there's a work around, but they didn't know anything about it.
I've tried different socket servers, mine in ASP.NET, and another in PHP.
If i were able to get a host that allows me to do what i want, i could build multiplayer flash games. I could host the game in my IIS server, but my machine is so terribly slow, it wouldn't be a good idea.
Ty, does your host allow you to connect to ports on their servers? I know when you were building SO you wanted to implement some online functionality, how were you going to tackle this?

All info welcome.


Old Post September 22, 2004, 03:32:18 pm
#2
Ty
Administrator
Shining Sideburns *

Posts: 837

Logged
Socket Problems
Hey Job,

I was going to use a cleint - client model for SO, with the server just hosting information about what games were going on. This would have used a PHP script to register each session with the database. This would ease the load on the server, at a cost of cheating between players. Not sure how it would have worked outside of the theory, but sounded good at the time. I'd probably stick with the same model now, but replacing the basic php script with a web service.

I don't think many hosts will allow connections on different ports, it's something of a security risk as far as they're concerned. You're more than welcome to try here if you want, but I would doubt it would work.


Old Post September 22, 2004, 03:53:58 pm
#3
Job
Shining Light *

Posts: 230

Logged
Socket Problems
Ah, client-client. That never occured to me. What would you do if the a client is running a firewall that prevents this?


Old Post September 22, 2004, 04:02:10 pm
#4
Ty
Administrator
Shining Sideburns *

Posts: 837

Logged
Socket Problems
Most firewalls have an option to check if a program should be allowed to access the 'net, so that's what I was basing it on. I'm not sure how Flash would handle it, so it's worth testing.


Old Post September 22, 2004, 04:16:18 pm
#5
Job
Shining Light *

Posts: 230

Logged
Socket Problems
Flash can't do it by itself. It needs a socket server listening in on the port it wants to connects to.
I could do it using the standalone flash player i think, by calling my socket server script (it's written using VB script) at run time.
I much prefer to do it from the browser though. So i'm thinking, let the server keep track of users and sessions and the like. Whenever a user wants to join a multiplayer game, the server updates its database and sends a page to the client that contains client-side VBScript which composes the socket server, and the flash movie. Thus having a socket server running and the flash movie ready, every user will be ready to connect to, and receive connections from other clients.
I'm not sure VBScript running on the client from a web page can create a socket server though. There must be some restricted functionality by IE's security settings for example.


Old Post September 22, 2004, 04:21:22 pm
#6
Ty
Administrator
Shining Sideburns *

Posts: 837

Logged
Socket Problems
I think IE would restrict the VBscript, but I'm sure there's a way around it. You could always use Java Wink Malicous socket servers could do plenty, so I'm pretty sure they're blocked.

What you said is sound, but I have no idea about Flash so I can't be of much help there I'm afraid.


Old Post September 22, 2004, 04:27:20 pm
#7
Job
Shining Light *

Posts: 230

Logged
Socket Problems
Maybe i just need a host that runs an XMLSocket for flash. I've seen some around, but i already prepaid Brinkster one year in advance.  Sad
I'll look into it...


Old Post November 09, 2005, 02:23:12 am
#8
Anonymous
Guest Logged
Good times
Quote
Maybe i just need a host that runs an XMLSocket for flash. I've seen some around, but i already prepaid Brinkster one year in advance.

 Sure sounds like good times! Great job man, I wish I could do exactly that right now...


Old Post November 11, 2005, 09:51:09 am
#9
Anonymous
Guest Logged
wrong
Do you not think you were wrong?:X:X


Pages: [1] Print 
« previous next »
Jump to:  

Powered by SMF 1.1.21 | SMF © 2013, Simple Machines