Introducing Socket Servers


A socket server is an application that can accept "socket" connections. Socket connections are persistent, which means they let you remain connected to a server, rather than keeping a connection just long enough to download information. Unlike a scripted page, a socket server is an application that's always running. It can accept numerous simultaneous connections and exchange information between them. Thus, while connected to a socket server, you can send or receive information any time. Using socket connections to continually transfer data to and from the server is how most chats and multiplayer games are created in Flash.

A key thing about using socket connections with Flash is that you don't have to request information to get it for example, in a chat a message can be pushed into Flash at any time without Flash asking for it.

You cannot, however, just drop a socket server into the CGI bin of your Web site or place it in a normal Web-accessible directory. Usually written in Java, C, C++, or Visual Basic, socket servers require root-level access to the Web server which usually means that you need to be running your own dedicated server. You can, however, set up a socket server on your own personal computer so that you can develop with it. For more information on that topic, see Appendix B, "Multiuser Servers."

graphics/dfig06.jpg



Macromedia Flash MX Game Design Demystified(c) The Official Guide to Creating Games with Flash
Macromedia Flash MX Game Design Demystified: The Official Guide to Creating Games with Flash -- First 1st Printing -- CD Included
ISBN: B003HP4RW2
EAN: N/A
Year: 2005
Pages: 163
Authors: Jobe Makar

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net