ActionScript 3.0 :: Sockets Not Closing Data Connection On Windows

Nov 10, 2009

I've written a basic FTP client to allow me to upload files through the browser without using the FileReference.upload() func (because it's damn slow). I've got all the socket logic worked out and it works for one upload. When the upload is completed, the FTP data socket is closed by the socket.close() func which triggers a response from the command socket and starts the whole process over again. This logic works perfectly on my Mac in both Safari and FF.

I can upload files and cancel uploads and it all works as I want. When I test it on Windows (IE 8, FF 3.5, Safari 4 on WinXP and Win7) it is busted. I've tracked down the problem to the fact that on Windows, the socket.close() function is not causing the server to close the connection. I don't know if this is because it's not sending a proper command or what... but that's where it's at.

View 4 Replies


Similar Posts:


Php :: Flex Sockets Not Sending Data On Windows?

Sep 17, 2010

I am building a really simple Chat server/client using PHP and Flex. I have followed many tutorials and have a working server in PHP and a working client in Flex, except that if I use the client on Windows I can't send any messages.When I send a message on my Mac it goes through to the server and gets sent to all the clients, including any Windows client I may have connected. The message will actually display on Windows clients as well, it's only when I try sending from Windows that it doesn't work.

I've tried adding a crossdomain.xml file served by a PHP script listening on the correct port, but none of the clients ever seem to ask for it, and if the client works on Mac I assumed it should work on Windows. By the way I'm exporting the project as an AIR file (dunno if that makes a difference).I can't find anything regarding this so I'm wondering if I'm being stupid somewhere or whether I need to takes some special measures for Windows clients?I have pasted my client code below.

import flash.events.Event;
import flash.events.IOErrorEvent;
import flash.events.MouseEvent;[code]......

View 1 Replies

Mysql :: Database - Connection With Sockets Or PHP?

Jan 9, 2012

So, we want to move out from Air (Adobe stopping support and really bad implementation for the sqlite api, among other things). I want to make 3 things:

Connect with a flash (not web) application to a local mysql database.
Connect with a falsh (not web) application to a remote mysql database.
Connect with a flash (web) application with a remote mysql database.

[Code]...

if you can connect with socket wit mysql server, why use a web server (for example with php) to connect like a inter connectioN? why not connnect directly? I have done this a lot of times, using AMFPHP for example, but wouldn't be faster going directly? In the case of accessing local machine, it will be a more simple deploy application that only require the flash application + mysql server, not need to also instal a web server.

View 2 Replies

HTML5 Web Sockets (TCP Connection) With Flash Fallback

Sep 20, 2010

I read about a project that enables the developer to program a HTML5 web sockets application that is compatible with older browsers by automatically falling back to using a flash method.

View 1 Replies

Flex :: Sockets And Looping - Getting The Valid Connection?

Jan 13, 2012

On my network I have a couple of pc's all running a bespoke server which will return the username of the person logged in when queried.I have the following piece of code.

private function LoopAndList():void
{
var loopSocket:Socket;
var fourthOctet:Number = 6;

[code]....

Now when this runs it doesn't work as I first thought. The iterations go though. the fourthOctet value is decremented. But somethinjg strange happens. You will notice in the above code that I have a hardcoded IP address in the loop. I have put this there to ensure that there is always a valid connection. So am aware it will always be connecting to 192.168.0.4.

But the connection only happens on the last connect call.

The ouput is:

192.168.0.6
Connecting to 192.168.0.6
192.168.0.5
Connecting to 192.168.0.5

[code]....

View 2 Replies

ActionScript 3.0 :: Connect Flash To A Server Using Sockets Connection?

Oct 5, 2009

how to connect Flash to a server Using Sockets connection using in AS3.

View 16 Replies

Flex :: Sockets - Open A Connection Back To The Server?

Aug 4, 2009

I want to open a connection back to the server using Flex so I can stream chat messages to the Flex front-end. How do I do this and does Flex enforce any same-origin restrictions on ports or subdomains?

View 1 Replies

Media Server :: NetConnection.close() Not Closing The Connection?

Jul 7, 2011

I'm creating a very, very basic AIR application which mainly just needs to check if a given FMS is up and running. To do that, I'm simply connecting to the FMS and after a successful connection, disconnecting to free up the connection slots. All is repeated at some interval. This is like a monitoring tool.
 
However, looking into the admin panel (Influxis) I can see that the number of active connections is ever growing, even though I'm calling close() on the NetConnection instance every time.
 
Also, adding a timer to trace the netConnection.connected value outputs always "true", after the close() function has been called.
 
I'm not creating any NetStreams, nothing.

View 6 Replies

Flex :: RTMFP Direct Peer-to-peer Connection Working On Windows XP / But Not On Windows 7

Mar 1, 2012

we're having a strange problem on a project here. When we use NetConnection in combination with a NetGroup to initiate communication between two local AIR applications on Windows XP, they always both connect to the NetGroup succesfully and detect each other as neighbors. However, on Windows 7 both applications connect succesfully to the NetConnection and NetGroup both don't detect each other as neighbors.To reproduce this problem, here are two AIR applications:[code]

These applications can connect and send message to each other without a problem on Windows XP. On Windows 7 however, they cannot.Does anyone know why this wouldn't work on Windows 7 and what steps can be taken to make it work? It's critical to our project that this works.In some cases, the applications take quite a long time to detect each other as neighbors (up to 15 seconds in some cases), in other cases they detect each other immediately. Does anyone know what could cause this delay?

View 1 Replies

Flash :: SWFUpload Prematurely Closing Connection On Upload (nginx 499)

Jan 22, 2010

I'm using swfupload to upload files to nginx. It works fine for me & 99% of our users.For a couple of users, however, it fails somehow during upload. It opens a connection, but seems to close it before it's complete - nginx reports a 499 status in its access log, which is NGX_ HTTP_ CLIENT_CLOSED_REQUEST.I managed to get hold of one of those users to get some more information. They're running Flash 10.0.42, on XP with Firefox 3.5.7.Has anyone seen anything like this? Any suggestions on fixing it / how I might investigate further?

View 3 Replies

Flash - Servering Mulitple Flv Files From Custom Webserver While Keeping The Sockets Open Stops After The 6th Connection

Jun 28, 2010

This is driving me nuts and because it's a combination of various technologies together I have a hard time tracking the problem. I wrote a tiny HTTP server that serves .flv files; these flv files are encoded on the spot. The flv files are encoded with adobe's screencodec (I started with libflv but that was too buggy so I ended up implementing my own flv encoder). For the problem below it doesn't matter which codec I use or if I serve plain flv files instead of on-the-spot generated ones (the problem also occurs if I just send 12 h264 encoded files).

I also have a swf that I coded in as3. The as3 opens 12 connections to my server and requests 12 different flv's and just displays them as 12 different videos on the page. I tested the setup with Firefox and chrome and am using the latest flash client (version 10). The HTTP server is pseudo streaming those files; e.g. it tells the client the file is of mime type video/x-flv, tells the filesize is 2GB and just starts streaming. For sake of completeness here's a header it generates:

[Code]....

View 1 Replies

ActionScript 2.0 :: Expanding/closing Windows With Links?

Jan 3, 2006

I have my main page with all my links(all links are small squares), I want to be able to click the link and have it expand the square to a small window that a MC loads into so its like a new page within the old page. Also I want everything draggable which i can do now. I need to be able to close that window as well so the user can open a new window.

View 3 Replies

ActionScript 3.0 :: Sockets - Flash Application And Windows Application Works For String Buffer But Not For Object?

May 6, 2011

I want adobe sockets to send "customized" class object to a server socket(WinSock2). I used socket.writeObject(myClassObj). Actually My flash application and windows application works for string buffer but not for object.

Code:
//Flash
var buffer:String = "God Bless Us";
socket.writeUTFBytes(buffer);

// WinSock2
iResult = recv(ClientSock, recvbuf, recvbuflen, 0);

Is there anything I must do before writeObject() is used.?

View 3 Replies

Flash :: Java - "Unrecognized Windows Sockets Error: 0: JVM_Bind" When Trying To Debug In Builder 4.5 For PHP

Sep 27, 2011

Im trying to debug an app, not server related yet, with the new version of the FB, the one that comes with Zend in it. Thing is, everytime I try to debug, the message error is the same: "Unrecognized Windows Sockets error: 0: JVM_Bind"

View 2 Replies

C++ :: Transmit Data From C++ To Flex / Air Faster Than Sockets?

Feb 1, 2012

I have a C++ application which sends images to a Flex/Air front-end via TCP sockets. All this data transfer occur in the same host, so the socket connects to a localhost server. The problem is that the Flex/Air takes a really long time to read the entire image from the socket. The server sends the image quite fast, but the Flex/Air reads this image in tiny parts. The whole image has about 300MB and the Flex/AIR reads only about 1KB each iteration. So the flex keeps calling the socket data callback, which is causing the application to slowdown.

Is there any synchronous sockets to use with flex, or some kind of socket which can read the entire data all at once? If sockets aren't the best choice, is there any other faster options? My socket class looks like this:

[Code]...

View 2 Replies

ActionScript 3.0 :: Binary Sockets Ignors Data Sometimes?

Dec 16, 2009

Sometimes flash-socket ignors data which is being sent by server. I dunna know exactly if it's server-side problem(data actually aint being sent) or flash.How does flash handle numerous of data packages comming from server ? I know that flash perform all actions in single thread, but what happen when flash recive a lot of packages at same time ? Does flash serialize incomming packages and then call ProgressEvent.SOCKET_DATA for each package or just ignore those packages which cant be handled runtime ?

View 5 Replies

Flash :: Sockets - XMLSocket Can Receive Data But Not Send

Dec 20, 2010

I am attempting to connect to a python twisted socket server with Flash using XMLSocket. The connect works fine, and so does the receive. However I can't send data to the server. Is there a specific format I should be using? The reason I ask is because I couldn't read any data with the XMLSocket until the data was in the form "something", that is, the data string had to be valid xml followed by the null character. Is there a trick to sending data?

I don't think this a cross site security problem, because if it was, I believe I wouldn't be able to connect or receive. I am able to connect to the server using telnet and a java client without issues. EDIT: I figured it out, the problem was my server needed to have the data sent to it end with"

View 1 Replies

ActionScript 2.0 :: Starting With XML Sockets - Sending And / Or Receiving Data

Jul 18, 2004

I've begun playing with Flash and XML Socket Servers and I thought I started taking to it easy, I was able to connect and disconnect to a socket server I wrote and Unity but I seem to be having problems sending and/or recieveing data. I wrote a small amount of code to try it out:

[Code]...

It seems to be connecting fine but when I click and I try my send,

View 2 Replies

ActionScript 3.0 :: Data Limit To Sockets - Events Stop Firing

Apr 1, 2009

I have a pretty elaborate class that extends Socket and performs some serialization and data protocol stuff. It works pretty well when I send small messages. However, when I send anything over about 132KB at once, the SOCKET_DATA progress events stop firing -- or at least the function I've got listening for them does. My class is called RPCSocket and I assign the socketDataHandler function like this in my constructor:
addEventListener(ProgressEvent.SOCKET_DATA, socketDataHandler);

My socketDataHandler function (with lots of comments) is attached. Is there some limit to how much data can be sent over a socket at once? Is there something wrong with my code? Here's the trace output:
Code:
socketdatahandler
bytesAvail:4380
buffer length:0
reading bytes into buffer for concat
buffer length after concat:4380
buffer state:0
[Code] .....

View 6 Replies

Sockets :: Can Flash App Running In Browser Connect To Localhost To Get Data From Another App?

Dec 21, 2009

it seems that Flash was supposed to run in a sandbox in the browser. But, if Flash can get data from a remote server, can it similarly get data from localhost IP on the same machine? In other words, can I use a Windows app that provides a TCP socket on localhost to feed data into a Flash app?the answer is yes at least for the case of an SWF file hosted in the file system, URL...(turns out the localhost access error can be fixed if you add the SWF app to some security whitelist). Still wondering if this can also be done for SWF apps hosted on the network.

View 1 Replies

Sockets :: Write A Client In Order To Send Data To The Server?

Jun 19, 2011

I have written an ActionScript 3 class that is a Server Socket and accepts connections.I want to write a client in order to send data to the server. The client will be a mobile browser. I think that i will use javascript. Is it possible to connect to the server from mobile environment?

View 1 Replies

Data Integration :: Flash Form Data Connection Offline?

Jul 25, 2007

I want to create a flash form and be able to collect the dataoffline. The company I work for has a e-newsletter, and we wouldlike to set a lab top up (outdoors w/ no interenet connection) atan event and have the people sign up for the newsletter on thisflash form and collect the data in some kind of database (excel orwhatever). We had used paper in the past, but taking the names andemail addresses from the paper is time consuming and sometimes very

View 1 Replies

FLASH :: PHP - Persistent Connection (data Streaming)

Mar 11, 2012

The idea behind is a multiplayer browser game which interacts with a PHP server. Right now it works like this: Every second the browser is doing an ajax call to the php script which checks everything and returns the response. All in all it runs fine, but the problem is that the browser gets overloaded (because of thousands of ajax requests) after a while and it becomes impossible to play anymore. Also the delay of 1+ second is pretty much. My idea is to have a simple flash pixel which will have a 2-way communication with the server. For example:

[Code]...

View 2 Replies

ActionScript 3.0 :: Socket Connection - Sending Data Without Any Errors?

Mar 18, 2009

I use a socket connection to share data between flash and VB. I check the connection in VB and send a message when my flash is connected. My VB tool then sends the data continuesly (about every 40 milliseconds or slower) to flash. Works fine. Now I have to send some data back from flash to VB. I can send the data without any errors in Flash but it never arrives in VB.

View 3 Replies

Data Integration :: Securely Sending Connection String To Swf?

Oct 15, 2006

ok so when i need to connect a swf to some sort of data source on the server be it XML, a .NET DLL, a CFC or what ever so that i can load data from a database or what ever, everyone is always saying that i shouldn't hard code the connection string into my actionscript as anyone can get it and do malicious things with it. So how should i load the connection string into flash. if i put them on the server in an XML file or somthing like that then i still need to put a connection string into the actionscript in order to load in my main connection strings into the actionscript.

Basically i need to know how to load an external string into a swf without anyone else being able to get hold of that string for them selves. i am developing an app for somone and i need it to connect to a database and i need it to be secure. i have everything sorted except making the connection string to the database unstealable.

View 1 Replies

ActionScript 3.0 :: Establishing Connection To Php And Mysql Data Base?

Sep 11, 2009

i have been trying to execute a simple flash program that communicates with a php page which is linked to a mysql database.somehow the php is not returning any data to flash , and even falsh is not sending any data to php.. I am using wamp server on win7.Heres my actionscript code:

stop();var variables:URLVariables = new URLVariables();var varSend:URLRequest = new URLRequest("php.php");
varSend.method = URLRequestMethod.POST;varSend.data = variables;

[code].....

View 5 Replies

Media Server :: Bad Network Data; Terminating Connection

Aug 13, 2010

Many times, each day, a notice this error in the event log :

[Code]....

each time after this error, the netconnection between the publisher and the server close. I have some log in my app who check the connectivity between the publisher and the server:

[Code]....

I just want to confirm if it's the real issue of this problem or if other thing can provide this result and how can I prevent the deconnection of the publisher if this append again?

View 5 Replies

ActionScript 3.0 :: Html5 - Flash - Making Data Connection

Nov 8, 2010

I dont know a lot about html5 but is this expetced to compete with Flash/AS3 with regards to game making, data connection etc? It hard to image OOP with html as some games take thousands of lines to do.

View 2 Replies

ActionScript 3.0 :: Using A Local Connection To Share Data Between 2 Apps?

Jun 23, 2011

I am using a local connection to share data between 2 apps. The receiver has a function that runs every time new data is sent. I need to run another function every time that function runs, how can i do this?

View 2 Replies

Python :: Make A Flex Application Where It Gets Data From A Telnet Connection?

Feb 7, 2010

I am trying to make a flex application where it gets data from a telnet connection and I am running into a weird problem.To give a brief introduction, i want to read data from a process that exposes it through a socket. So if in the shell i type telnet localhost 8651i receive the xml and then the connection is closed (I get the following Connection closed by foreign host.)

Anyway i found a simple tutorial online for flex that essentially is a telnet client and one would expect it to work but everything follows Murphy's laws and nothing ever works.Now i have messages being printed in every event handler and all places that i can think off. When i connect to the socket nothing happens, no event handler is triggered even the connect or close handler and if i do the following the socket.connected returns false! I get no errors, try catch raises no exception. I am at a loss as to whats going wrong?

socket.connect(serverURL, portNumber);
msg(socket.connected.toString());

Is there something about telnet that i do not know and its causing this to not work. Whats more interesting is why none of the events get fired.The following is the python code that works!

def getStats(host, port):
sock = socket.socket()
sock.connect((host, port))[code]....

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved