开发者

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

开发者 https://www.devze.com 2022-12-22 00:30 出处:网络
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 reque

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号