Flash :: Establish An SSL Connection From A Socket In It?
Sep 26, 2010Is it possible to establish an SSL connection from a Socket in Flash?
View 1 RepliesIs it possible to establish an SSL connection from a Socket in Flash?
View 1 RepliesI've read about WebSockets but they don't seem to be pure "sockets", because there is an application layer protocol over them. "ws:"Is there any way of doing a pure socket connection from a web browser, to enliven webpages?Here are my random stabs in the darkApplets sockets provided by Java (need java installed)Flash sockets provided by Flash (need flash installed)But about HTML5, Why are they called WebSockets if they aren't Sockets?
View 3 RepliesHow can I establish connection of a Flash site with a database(i.e. MYSQLetc)?
View 4 RepliesI've been searching a long time to find a way to do multiplayer in flash. I came across xmlSocket. I'm trying it out really simple at first:
[Code].....
I've gotten all the policy stuff working. And this works perfectly while testing on my computer. If you're wondering, I have a python script listening on port 2950. Here's the python code:
[Code]....
Finally to the problem. No matter what I try, I can't seem to get these two applications to communicate when on different machines. When I try it, no messages even get through to python, it doesn't see anything trying to establish a connection. So I suspect it is having a problem on the flash side of things. Also, is there any way to have multiple flash apps communicating directly, rather than going through the server?
I've designed a flash [as2 php xmlsocket] chatroom , it works fine in localhost but i don't know how to run on real website server.I've uploaded the files but when i run the flash it can't establish a connection.What server requirements i need for xmlsocket?
View 0 Replieshow to establish http connection to a specific url and get data from that url in flex mobile project.
View 2 RepliesThere is a flash movie which is using flash.net.Socket to connect to a server. But there could be a situation when the server is not running, hence nothing is listening on the port socket is connecting to.
When I do "telnet hostname port" I get a fast connection refused error. But flash.net.Socket does not invoke any event (see below), but silently waits for socket timeout. For me it is important to reduce time needed to detect non-existing server as much as possible to be able to reconnect to another server in the cluster.
I've tried the following events, but to no avail:
close
connect
ioError
securityError
socketData
None of these is invoked in such situation.
Is there a way to detect that TCP connection has been refused using flash.net.Socket?
.to the letter after installing Apache and PHP on my pc. And i am geting really fraustrated because i cannot get the flash objects to connect to the PHP socket when they have been uploaded to the localhost server or any other online server. However it works no problem when i run the flash object straight from my HD. The socket is definately open because telnet connects to it fine.
My pc ip is 192.168.1.7. And when I transfer the flash object to any other pc on my lan, if it is on the hd, it connects to my pc no problem. However, if i were to type in http:[url]... it DOESN'T WORK.
I am using flash socket to connect to ftp and upload files. Its working fine in flash IDE but it give security error in browser. I have loaded policy file by Security.loadpolicyFile() also i have specified Security.allowDomain("*") but still it doesnt work. I have placed my crossdomain.xml at root level on ftp.
My crossdomain.xml looks like this..
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="master-only"/>
[code]...
Yet there is security error...
Optivote IR8 is basically a voting system with a bunch of remote controllers, which can send IR signals to a receiver, which is connected to a computer through a USB port. And I'm trying to write my own little software for that with Flash.Optivote receiver communicates with software through a virtual serial port. When I connect to that port through PuTTY, I can see signals whenever I press any button on the remote controllers. Although, when I connect to that port through Serproxy (which relays a socket connection to a serial port connection), the remote controllers don't seem to work. I just get the same signal every half a second or so, over and over. I'm guessing the receiver is trying to make some kind of handshake this way.
The thing I can't figure out is what PuTTY does that Serproxy doesn't to make the serial port connection work. Maybe there's some proper way to tell the other end when I connect?(I use Serproxy, because Flash applications cannot connect to a serial port directly, but supports socket connections)
I have a project where I communicate net.socket class.Everything works fine but when I try to start the debugger I only get someerror message:
Versuch, zu starten und Verbindung zu Player mit URL
c:flash_testSocket.swf herzustellen
[SWF] c:flash_testSocket.swf - 6006 Byte nach
[code].....
is there a way to use the debugger with a socket connection? When running debugger I can't get a connetion to my serveer.
View 3 RepliesI am able to establish socket connection to a remote machine by first loadind the policy file. But the same thing is not working if i am trying to connect to the same remote machine & 443 as port No. In policy file the connection is allowed to all ports.
Is there any thing else to be done. I am geting sandbox violation error.
I am using flash socket to connect to ftp and upload files. Its working fine in flash IDE but it give security error in browser. I have loaded policy file by ecurity.loadpolicyFile() also i have specified Security.allowDomain("*") but still it doesnt work. I have placed my crossdomain.xml at root level on ftp.My crossdomain.xml looks like this..
<!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
[code].....
how to check if an xml socket connection was made? i mean the code for it.
View 5 RepliesI'm writing a online application in flash and I'm trying to test the socket connection over a java server running on localhost. It works fine running in the CS3 environment using ctrl+enter and it's communicating with the server and sending information back and forth. But I can only test one client at a time like this. When I try to run the swf straight it isn't connecting. how to set up the permissions correctly so I can test locally?
View 1 RepliesI have 2 applications which I wrote in ActionScript 3.0 as client and C#.net as server. These are basic chat applications. Also I have a test website which is running under the same machine with chat server application.
Server application is listening 289 port, flash application connecting to server with domain and 289 port, it can talk with server during working on Flash. But when I put the flash in a html page, the socket connection is breaking after a while because of security reasons.
I know that is necessary to put a crossdomain.xml file on target website's root folder. The problem is here: Yes, there is a crossdomain.xml file like this:[URL]...
I would like Flash to reconnect to a socket if its connection is dropped. I am using the Socket class to establish a connection and then adding an Event.CLOSE listener to the socket. What is a good strategy to reconnect back to the socket if the connection has suddenly closed? Here is a the method I am calling inside the close handler. The connect() method establishes a new socket connection
HTML Code:
private function handleOutage():void
{
// if socket is not connected
[code]...
However, I keep getting the following error:
HTML Code: Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation
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 Repliesimport flash.events.*;
import flash.net.XMLSocket;
import flash.system.Security;
[Code]....
I want to implement flex web application using Socket connection. But I am getting sand box violation error for remote sites in sample application . It is working fine in local.
Error:
Security Sandbox Violation
Error: Request for resource at xmlsocket://170.21.8.0:4000 by requestor from http://localhost/Sample/DotNetSocketConnect.swf is denied due to lack of policy file permissions.
I am trying to pass object to the server through socket connection in actionscript 3. What is the best way to do that?
is serialization better? or should I encode it first and then sent it as string?
I am writing a peer-to-peer binary socket program. There are only two endpoints. One socket is listening on my laptop system. The other socket is broadcasting from my desktop system. I have a third program running on a hosted server, that is available to broker the connection between the two. My problem is that when the laptop and desktop are on the same network, they both have the same internet IP address but different intranet IPs, but when the laptop is on the road, then the IP addresses are different. In order to be truly peer-to-peer, I have to write it so that after the connection is established, that the two computers communicate directly between one another. How is this generally accomplished, when the two computers could potentially share the same IP address, if they are running on the same network?
View 1 RepliesWhy the Close Event is not dispatched after I disconnect my wifi connection? Or any way to determine if the connection is active.
View 2 RepliesI have a simple IRC socket that is used to communicate with servers for a web-based IRC client. Unfortunately, attempting to connect to a network results in a security error. I read up on sandboxes and their appropriate permissions, and then used Security.sandboxType to get the sandbox of my socket, which came up as remote. After reviewing the documentation, I still don't fully understand how I can enable my socket to connect to a remote IRC server. I tried Security.allowDomain,
View 1 RepliesI am trying to adapt an existing flash web chat application for the Android mobile phone and I am having this really annoying issue. The server is a custom based solution and can send back both binary messages or XML. So I can use either XMLSocket class or the Socket class to get data from the server. Everything works fine when deployed and I connect from the desktop but when I try it from the android mobile I get the infamous errors #2031, followed by #2048. Now the crossdomain.xml file is rock solid and works well for desktop. When the connect socket method runs I see that the server replies with the crossdomain file but I get the error when running on the mobile. Has anyone bumped into this? Is there some limitation from the mobile phone part. I wasn't able to find anything relevant for this issue, in terms of the phone not allowing Socket or SMLSocket connections
View 5 RepliesI am starting with a short introduction: I am currently working on a project, which involves a server application written in .NET (C#) and a flash gui app as client (standalone flash player 10 [code is written in Actionscript 3.0]). The server constantly sends bitmaps to the client (up to 30fps). The connection is established using binary sockets and data ist streamed to avoid socket open/close/reconnection problems.The bitmaps sent to the client are marked with begin- and end-tags. A length field was added as well, to optimise the following parsing process. The client buffers the received data up to the point where an end-tag is found. The client reassambles the bitmaps on the screen by parsing the current buffer. Parsing means looking for begin-tags and length fields and/or end-tags of pictures packages. The resulting bitmap data is copied into a byte array and will loaded into a movieclip using the flash.display.Loader class ( bytePictureLoader. loadBytes( byteArray ); ).[code]While testing, I found out that in some cases the data stream becomes currupted, i.e. data is lost and/or the transmittion is incomplete.
A good thing is that this error is reproducable.It seems that as soon as the Flash Application Window is dragged (moved on Windows Desktop) the stream lacks data. The same error occurs, if too much data is sent to the client. The results are performance problems, data loss and other strange effects. The more data is sent on the stream, the more data has to be parsed and the more data gets lost somehow. Sometimes this leads to a memory problem, because Begin- and End-Tags aren't transmitted correctly. In order to fix (counteract) that, I discard data as long as there is no Begin-tag found and the buffer is cleared when the size exceeds 1Mb.It works so far, but the application lacks performance and stability.I.e. If 20 bitmaps per second with 620x390px are sent to the client, the client only receives 16 to 17 bitmaps, if the application does nothing else.If 30 bitmaps per second with 620x390px are sent to the client, the client only receives about 20 to 21 bitmaps.I am guessing that using actuall video streams would be better, then sending one bitmap at a time in a byte stream.Is there a proper example on how to build a client app in flash to receive/parse a binary data stream?Does anyone else has recognized the lost-data problem or the interruption of streams?
I'm having a problem that I'm not sure is necessarily tied to the Flash, but I don't know what the root of the problem is yet.I have a SWF that connects to a socket using the Socket class. This works fine.I'm also making (jQuery) $.getJSON() requests to load certain page data. This works fine.
However, when the Flash socket is connected the Ajax requests stop being sent. By this I mean that it seems that the HTTP requests being made are stored in a queue while the socket is connected. As soon as I disconnect from the socket the HTTP requests continues to load fine. The HTTP request never times out (as it's not even being sent to the server), but just hangs there waiting...until I close the socket connection.
I've verified both in the jQuery and Adobe docs that both the Ajax (JSONP) requests and the connections using the Socket class are asynchronous, so I'm really confused as to why the socket connection would block the HTTP requests.
I have designed with Adobe Flash Professional CS5 a .fla project that integrates a client - server connection. After publishing it, I have the following issue:- when running the generated .exe file for Windows, then the connection to the server works perfectly- but when I am running the published .html file, then nothing is sent to the server.
I have tried to change the Publish Settings. When setting the Local Playback Security in Flash menu to "Access network only" instead of "Access local files only" then the last packet that was send using the .exe file is resent once and that's all (the html client does not receive the response from the server and the next connection attemps generate data transfer). I guess I have to change some security settings somewhere but I didn't find which.
I made simple java server on one pc and tried to contact it from another pc on LAN from localhost, so far so good, it worked flawlesly. But when I want to contact the java server outside the security sandbox(from webpage), it will throw me an error:
[Code].....
When I send number (int)52 s.Send(BitConverter.GetBytes((int)872415232));, flash show me trace(socket.readInt()); 872415232 If i send 872415232, flash show 52.Why? And how it fix?
View 1 Replies