How to reUse URLRequest to send data to TCP socket in Flash, Actionscript?
How to use URLRequest to send data to TCP socket in Flash, Actionscript?
So I have TCP server which 开发者_如何学Cis listening to some port and on every connection is sending sounds MP3 data to requestor
I've done URLRequest and Sound class plays my sound.
How to send data to that socket not opening new socket connection (using URLRequest or something )
URLRequest only works with the http protocol. So the "TCP Server" you have running must communicate using the http protocol. If does, you should be able to write the address as http://www.mydomain.com:8080
where 8080 would be the port you server is listening on.
If your sever is using another protocol, you have to use the Socket
class (or the XmlSocket
class).
Also be sure to check the security details.
精彩评论