any suggestion folks........waiting to listen more
The answer(s) is "it depends". You want to build it for educational purposes?
It also depends on the server side solution. Socket works just fine, I built
myself chat applications against a C, C++ server using sockets. I can vouch for
the fact that it worked. However at the same time the server could process HTTP
requests so I made it flexible and easy to switch. Both approaches work. Your
could use FMS in the backend and local/remote SharedObject(s) and NetConnection
to send data back and forth. That also works. So here is the it depends part.
What is your goal? Do you already have the back-end built? If is just
educational install a FMS on your local machine and you can google for an
already built version. In half a day you could have it running ...
My 2 cents,
You can use LCDS.
i want to learn some thing core abt server connections ...... that shd help me to understand how they work how they send n receive data........in that context shd i use as3 socket programmimg??
will it help me to make a chat application??
or theres something else that helps me to learn sever connectivity better?
In my opinion the more complex part is writing the server side... Once you have
that the client comes quite straightforward. There is no such thing as bad
experience at least if you learn something from it. So go ahead with sockets.
Once you feel you master them well enough move to something else... You said it
yourself that it is for learning purposes...
i have no idea of sockets.but i have made sevral chat application in flex using streaming server.
there are three ways using streaming server:-
Wowza Media Server(Support Core Java as server side)
Red5(Support Advance Java as Server side).
i worked on all the three server.it is not a tough part.just download any server and check test chat aaplication.still having any doubt the please let me know.
but its quiet intersting to use sockets in flex chat aaplication.i am very excited can you give me some guidance regarding this.
Thanks And Regards
I am not sure if there is some ChatServer socket available for download like FMS
or the other 2 you mentioned. I only worked with already built by other people
servers. So my client needed to comply wit that server (happened to be written
in c/c++). Custom communication protocol and other stuff. In the end Socket
programming comes down to producing bytes and send them down the pipe. You can
write your own simple server which could just open a socket and listen for
incoming connections and then just display the message on the console and send
it back to client. Something like this link does...
in mind that this uses datagram sockets (UDP), it is a lower level comunication
than TCP/IP. But you can get an idea of the basics. Instead of udp sockets use
simple sockets from as3 and you could do the same for start.Take it as an
exercise modify the code both client and server side to be compiant with tcp
sockets instead of upd sockets.
Basically you have 2 choices:
Polling or Serverpush
Your client looks on the server if there is a new message for him in a predefined intervall.
That means any client which is connected is pinging continiously your server.
You can easily solve this with PHP.
The clients register to the server and once one clinet send a message to the server, thew server sends(forward, push) the message
to the connected clients.
This is not possible with php , you need something like JAVA
You can try it with BlazeDS(free) or even simpler by using Adobe Stratus, Cirrus, AFCS or however they call it these days (they rename it so often)