# 1-1 介绍(Introduction)

> 这个指南中，我们将创建一个基本的聊天应用。它几乎不需要node.js 或 socket.io之前的知识，因此它是所有同等知识水平用户的理想选择。

## 介绍

用流行的web应用栈比如LAMP(PHP)去编写一个聊天应用程序一直非常困难，它涉及到轮询服务器以进行更改，跟踪时间戳，并且应该会慢得很多。

传统上，socket 是大多数实时聊天系统所构建的解决方案，在客户端与服务端之间提供双向通信通道。

这意味着服务器可以将消息推送到客户端，每当编写聊天消息时，其做法是服务器获取消息，并将其推送到所有连接着的客户端。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://socket.gitbook.io/docs/1-zhi-nan-guide/introduction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
