[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Hey Folks,
    I'm leaning in a different direction from my primary studies/use of Cold
as a fantasy RP environment in lieu of a fascinating idea I had. I just
swagged my own copy of Flash5 and I'm lov'n it. One of the new features is
the implementation of the XML Socket object. You can see all the specs on it
below in the excerpt I included.
    Now, my experience in coding sockets is strictly within Visual Basic 6
and even with that it is sadly limited... but that sort of thing has never
stopped me before! That's why I pester you pros with my inane questions!!!
    My idea is to use Cold as something of a host for client connections. I
know, I know... it already IS just that, but bear with me here... The client
would be web-based, built in Flash5. Cold could help handle chat connections
or populate variables within Flash with data that it stores. There are ALOT
of possibilities for the clever Flash/Cold coder. I'm just about rabid to
try it.
    I wanted to know a little more on how Cold handles TCP/IP connections.
For instance, how would I go about opening up a new port for the "Flash
client" to connect? What about listening, reading, writing, etc? Any ideas?
Anyone.... anyone?

As always, thanks for the assistance. You guys have taught me oodles of
stuffage and I appreciate it!!!

PEACE!!!
- Andy/Paidran/Grim



Excerpt from Flash5 help file...

XMLSocket (object)
    The XMLSocket object implements client sockets that allow the computer
running the Flash Player to communicate with a server computer identified by
an IP address or domain name.

Using the XMLSocket object
    To use the XMLSocket object, the server computer must run a daemon that
understands the protocol used by the XMLSocket object. The protocol is as
follows: * XML messages are sent over a full-duplex TCP/IP stream socket
connection.
      * Each XML message is a complete XML document, terminated by a zero
byte.
      * An unlimited number of XML messages can be sent and received over a
single XMLSocket connection.


    The XMLSocket object is useful for client-server applications that
require low latency, such as real-time chat systems. A traditional
HTTP-based chat solution frequently polls the server and downloads new
messages using an HTTP request. In contrast, an XMLSocket chat solution
maintains an open connection to the server, which allows the server to
immediately send incoming messages without a request from the client.