ActionScript 3.0 :: Communicate With Server Through Binary Socket To The Server Through IP Address?
Oct 10, 2009
I am working on the web base flash application I am trying to communicate with server through binary socket to the server through IP Address and Port using Action script 3.0 at the server side we are using java. I will like to send binary data string to the server in a clubbed single packet. I dont know the Action Script 3.0 as much.for this We will have to communicate through IP and Port only
View 1 Replies
Similar Posts:
Dec 30, 2008
I'm trying to make a little ftp upload app - not a full FTP client, just something to enable image upload with decent performance. I basically took the approach Lee used in his POP3 socket tutorial. The problem I'm having is that I can connect to the FTP server and I can authenticate and log in but as soon as I try to enter passive mode for data transfer I get nothing- not even an error. From looking at the FTP RFCs, FTP requires two TCP connections - a command connection and a data connection - does this mean that I need to open a second socket for the data transfer? Another possible issue is the Flash Player security policy not allowing conection to ports under 1024 - I have not placed a policy file or policy server on the host running the FTP server but as I can successfully login, I appear to be able to connect to port 21 (standard FTP port) anyway. The code I'm using is:
Code: Select allvar s:Socket = new Socket("ftp.actechnology.co.uk",21);
var ftp_response:String;
s.addEventListener(ProgressEvent.SOCKET_DATA, receiveReply);
s.addEventListener(IOErrorEvent.IO_ERROR, showError);
[Code].....
why passive mode kills it or has successfully connected to a FTP server with the socket class
View 10 Replies
Jan 15, 2009
I am attempting to setup a binary socket connection between flash running on my desktop and a Rabbit RCM3800 Microcontroller providing the server on my home network, which has no file system and has a very basic http server on it. Due to limitations of the microC I cannot run Java/Perl/Python or any other server on it other than setting up a server using its own native Dynamic C language (essentially manually opening and controlling sockets in C). I am able to successfully connect to a socket on port 3333 of the server and transfer information between the server and the .swf file when it is the sandbox type "local-trusted" (while I'm debugging in Flash).
Because of this I'm fairly certain the code to setup the socket between the server and flash works fine. My problem occurs when I try to run the .swf file as "local-with-network" (such as running it after publishing on my desktop) or "remote" (accessing the .swf file when it is located on the server) and it then requires a socket policy server to host a socket policy file on the server. On my server I have code setup such that whenever a socket opens on port 843 or port 3333 (my data port) and sends a stream of raw data containing the request <policy-file-request/>, the server writes back in ASCII the below code and closes the socket.
Code:
Select all<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "[URL]">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*" to-ports="*" />
</cross-domain-policy>
[Code] .....
So for some reason flash times out while waiting for the socket policy file. I have tested sending the <policy-request-file/> over telnet, and have received the above policy file. I have also sniffed using wireshark and saw that my desktop sent the policy request and received the policy file. I am guessing that Flash times out because it is waiting for some kind of terminating character that states the end of the policy file, and to that end I have tried sending. Interestingly, instead of sending the policy file I have tried sending random data from the server to flash, and flash displayed the Warning: Ignoring policy file at (URL) due to incorrect syntax. Because I don't receive this warning when I send my policy file I don't think it is formatted incorrectly.
I have also tried using the below flash code to hold the socket request open indefinitely, but it also errors after 20seconds.
Code: Select allSecurity.loadPolicyFile("xmlsocket://192.168.1.59:843");
The .swf file will eventually reside on the server itself at 192.168.1.59/myProg.html. I have only tested the flash file remotely on the server a couple times, and in addition to the previous warnings/errors, I received the warning: SWF from (URL) may not connect to a socket in its own domain without a policy file.
View 1 Replies
Jan 8, 2010
i am new on steaming & flash server; when we try to use RTMP over HTTP the outside client gets the internal IP address of the FMS server instead of the NAT one or public IP address, how can we solve this.
View 1 Replies
Nov 2, 2009
Like the title says: How to communicate between different apps on 1 server?I'm trying to build a program on which I need to have communication between 2 or more apps on the same server.
View 4 Replies
May 5, 2011
I have project Business card design, my app have feature save their design with PNG extension after customer design their business card to server. I sent binary of PNG to server by urlRequest and urlLoader. But with files have file size more than 5mb, it can't upload.
View 5 Replies
Oct 19, 2011
I'm trying to load some binary data from server like this
var urlRequest:URLRequest = new URLRequest("http://localhost/test.php");
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
[code].....
View 4 Replies
Oct 8, 2009
I am working on the web base flash application I am trying to communicate with server through binary socket to the server IP Address and Port using Action script 3.0 at the server side we are using java. I will like to send binary data string to the server in a clubbed single packet.
View 1 Replies
Dec 19, 2009
I have a problem with my application. Here's what i have up till now[code]...
Everything works fine, you can scale the image etc.
I would like to download the new image after you scaled it. I have been trying it for a long time now but i cant get it to work.[code]...
View 4 Replies
Oct 16, 2009
communicating in as3 with an server via TLS? (I have on a server an mp3, and the server is HTTPS that requires an certificate and a key (TLS) and I need to get that mp3 on flash) I found some classes (Crypto) but there the TLS it's only partial implemented and support for client-side certificates is not implemented yet.
View 2 Replies
Dec 20, 2011
I'm trying to send about 1 MB of binary data to server via URLLoader. But when I call method load of this class, my application hangs for about 1-1.5 seconds, then uploading runs normally. How can I prevent it?
View 2 Replies
Aug 9, 2011
Cen i communicate to FMS from browser not with swf. For example - by javascript from user side or by C# from IIS server side.
I need to built a live chat appliction where the swf only get the live streem and show it to the user but all the other logic code that communicate to FMS will be not in the swf and not in some *.exe file.
I need this because this live chat appliction will have to work on apple ipad and iphone soon when FMS will be able to stream to those devices and i will have to abandon the swf anyway.
View 1 Replies
Jun 28, 2010
I'm trying to communicate my flash application with my server. Either the problem is my code is working on Flash Professional, but I have prepared all my interface on Flash Builder which uses Flex 4 -SDK. My code does not work on Flex Project.
[Code]...
View 1 Replies
Jun 2, 2011
What's an easy and secure way to let my Flash app communicate with my back-end server?
The Flash app, which is a video player, should retrieve the person's username and send back an ID. How would I do this?
Note: Back-end is written in Javascript.
View 2 Replies
Jul 22, 2011
I'm currently working on a project that need to communicate with java from air without the use of a server like Tomcat. For this i found and use Flerry.Communicating between Java and Air is no problem, as long as I try to send a message from the class that I initially instantiated from Air.What I try to do is subscript to messages from a Message Class in java and use that class to send info and errors to Air from Java.
MessageController.java:
public class MessageController
{[code]....
the infoMessageHandler receives an message containing test message, as it should. How can I dispatch messages from whatever class in Java and catch them on the Air side?
View 1 Replies
Aug 13, 2011
I have made an AIR application where the file communicates with a PHP file in order to display data.I have WAMP installed on my computer, and the application works when I test locally using WAMP but if I upload the php on an online server(I tried on two of my servers) and run the AIR application it seems that it doesn't communicate with the server so no data are displayed.
var url:URLRequest = new URLRequest("http://www.test.com/test.php")
This is how I call for the php on AS3, like shown above.The php file gives no errors when I browse it online so, I suppose there something else going on?
View 1 Replies
Aug 9, 2011
Cen i communicate to FMS from browser not with swf. For example - by javascript from user side or by C# from IIS server side.
I need to built a live chat application where the swf only get the live stream and show it to the user but all the other logic code that communicate to FMS will be not in the swf and not in some *.exe file.
I need this because this live chat appliction will have to work on apple ipad and iphone soon when FMS will be able to stream to those devices and i will have to abandon the swf anyway.
View 1 Replies
Aug 9, 2009
I have a swf file stored locally on a linux machine, that is launched on boot up via opera. the swf communicates with the server to login and retrieve xml data, and then loads other swfs on the server.
i have added the crossdomain.xml to the root of my server, and added the appropriate System.security.allowDomain('my domain').
this process works fine on a windows machine, but with the linux setup, the call to login with 'sendAndLoad' does not return a successful result.
View 0 Replies
Nov 27, 2010
I'm working on a flash MMO with a c# server. I have a simple messaging protocol for the sockets. When a client joins he sends out this:
[Code]...
View 2 Replies
May 5, 2010
I originally tried to capture, encode and upload the audio using Silverlight, but because of the lack of suitable client-side encoding options, I'm now giving Flash a shot (Flash has baked-in support for encoding to Speex).I think I've figured out how to capture and encode the audio... But now what was easy in Silverlight, is the challenge in Flash.My server-side is .NET: MVC2-I'm open to receiving the audio in whatever manner is best- REST, WCF..So that's my question: How could one upload binary data from Flash, to a .NET server-side endpoint
View 1 Replies
Sep 9, 2011
With normal Flash SWF's I use URLRequest to communicate with external servers/sites to send/retreive data from a database - pretty standard stuff. But can iPhone apps published from the CS5 environment communicate with external servers/sites?I'm still organising my development license for the iphone, so want to check before I fork out the money for the registration.
View 1 Replies
Oct 12, 2009
I am trying to encode and stream live video. I have downloaded both the Flash Media Encoder and Flash Media Server. To complete the process of streaming video, it appears that I need to obtain a "flash media server URL address" which is called "RTMP" on the encoder page. Where can I find this? Is this something that can be downloaded, or do I have to purchase this from a partner like Level 3 communications, AT&T, etc.?
View 1 Replies
Sep 18, 2009
i am having a serious issue with finding my RTMP address which may be something very simple to you all out there, i just installed Flash Media Server 3.5 at C:Program Files....i have purchased a video flash chat program and it needs to know the rtmp address which im not sure. I named the Flash Server EazyFlash.....not sure if i should install flash server somewhere else on server so website can see it??? The flash console and sample videos are working great but its all C: Drive??? would it be RTMP://EazyFlash? The software came with flash application which was a folder called videoflashchat which i copied to applications folder.
View 6 Replies
Dec 6, 2010
I have a dedicated server running IIS with a website, and we have installed FMS 3.5.
We are going to play vod and only over RTMP, so do not want to install apache.
We have mutiple IP addresses andI would like to assign FMS to a particular IP address so it does not conflict with IIS on port 80. Otherwise, at start up, FMS loads first and loads the IP address of our website.
How, specifically, do I assign FMS a particular IP address? Is it one of the config files?
View 1 Replies
Jan 8, 2012
Is there any way that I can get the IP address of the broadcaster? In know how to get info from the XML file about online channels and online users but I have not yet found the right place on how to get the IP address of the broadcaster.
View 4 Replies
Apr 23, 2011
I have made a socket server in C# for a flash game that I am developing, I got the code from somewhere and I am a beginner in c# and .net development . It works fine in practice when connections are made and the server functions correctly. Get 2 concurrent connections at the same time and we have a problem. here is the basic aspects of the socket server below: (alot taken out for obvious reasons) how can I alter this so that it can handle concurrent connections? Should I be threading each response?
[Code]...
View 4 Replies
Oct 22, 2011
I'm writing socket server in java for my flash browser based game and i need to connect to mysql database. Is it possible to connect to mysql through socket server and send received data to connected flash clients?
View 1 Replies
Oct 9, 2006
If you cannot afford a socket server and want to support a massive amount of people chatting and playing multiplayer games on Flash, what would you do? Should I use PHP/MySQL? Would that put too much strain on it and make it slow?
View 1 Replies
Feb 22, 2008
I wrote a XML Socket server in PHP recently because I wanted to make a multiplayer Flash game in AS3. This server is supposed to be completely generic and doesn't have any game logic. You should be able to build pretty much any game with this server.
While writing it I realized the new version for Flash Player 9 r115 had some new security issues surrounding Sockets. So I implemented a crossdomain.xml and modified the XML Socket server to serve a crossdomain.xml file if it encounters a security request. The security policy socket server runs on 843 always (it's the default port flash player looks at).
Along with the PHP Socket server I wrote an XML Socket client in ActionScript 3 (AS3). This set of classes is also completely generic and is completely event driver. Your game client would include this file and pass it parameters through the Events classes in order to communicate with the socket server.
Lastly I created a very simple game / prototype using the AS3 class and PHP server. It is very basic, each player gets a ship, and can move around and shoot at other players. However I implemented all of the funtions: Logging in, Logging off, Synchronising players and movements, creating objects (ie firing a bullet), etc
View 13 Replies
Nov 28, 2008
I want to test a simple PHP socket server with Flex, server seems to work fine when trying to test using telnet, but Flex doesn't display any responses, here's my code:[code]
View 4 Replies