views:

182

answers:

1

How to use URLRequest to send data to TCP socket in Flash, Actionscript?

So I have TCP server which is 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 )

A: 

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.

Lillemanden
I am using addres http://www.mydomain.com:8080 with URLRequest to get mp3 from it=)
Blender
So it solved you problem?
Lillemanden