View Full Version : Can AIR do Client/Server?
Cyanide
04-23-2009, 12:52 AM
I'm in the process of designing a new application, and I'm interested in using AIR to do it because I am already very familiar with AS and adobe's products. What I want to know is, can Air support a client/server architecture without any support from back-end stuff like Cold Fusion or PHP? I want somebody to be able to run this app on their desktop, and have multiple other users connect to them, and be able to send data (asynchronously) back and forth. I also want to save data sent by clients to the hard drive on the server machine.
Basically I want to know if Adobe has finally taken the Flash/AS framework and given it some real power, or are we still playing with safety scissors?
Thanks in advance. :)
kukoc
04-23-2009, 09:37 AM
i think it is possible. ofcourse without a server everybody need to have public ip or be in the same lan.
so in my opinion doing things with server is beter becouse everybody can connect eachother even under the NAT.
well. there is something like SocketMonitor class which probably is for reciving requests of connection. so im pretty sure that connection p2p using AIR is possible (i've never tried that).
second part is easy to do. just send the data by POST using http connection.
but there are some security restrictions:
"The POST operation must be performed in response to a user-initiated action, such as a mouse click or key press."
evride
04-23-2009, 12:51 PM
I havent used the SocketMonitor but I'm pretty certain it will not allow what you wanna do. I would suggest creating a windows service or something with C#, C++, or VB and have that act as the server for all computers to connect to (even the localhost). You would also have to create your own installer that would create shortcuts to the service only and then after its started start the AIR app.
GuyFawkes
10-31-2009, 01:02 PM
You should be able to do what your talking about using binary sockets. Since its an Air application you are creating you don't need to worry about security issues. I'm in the process of creating an irc client in air and working with the binary sockets in as3 so far has been pretty straight forward.
MZDisaster
11-06-2009, 09:50 PM
i don't know any thing about soket connection,where can i get a socket server application?
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.