First, Socket is one technology. Do not confuse Socket.IO and Socket. Socket.IO Socket is not the only model today, and nor is it the only model currently WebSocket.
Socket is how you organize client-server model to one of two parties are in a state ready replied the other, and vice versa. To ensure this, the connection between client and server must be in a state of "keep-alive" and the process must always occur between the client-server synchronization. Socket will offer the possibility of immediate answers from one side while the other two made an event, instead of having to execute a variety of complex procedures as the previous connection, and your application will become real-time applications for example, Yahoo Messenger, Skype etc .. are all applications are built according to the model socket.
In previous web programming, building the model client-server socket right through the part 3rd Because software model does not fit the socket programming language Server as: PHP, ASP.NET, JSP etc .. these languages always work the way: Die immediately reply Client Server connection when finished. However, I emphasize: We can do it with any web-socket programming language. Only thing, the old languages, this job you need to understand the protocol http, tcp; How is one to understand the request header, etc ..
Node.js is a new language, built purely with Javascript. This is an advantage of Node.js to program web-socket:
đang được dịch, vui lòng đợi..