> For the complete documentation index, see [llms.txt](https://socket.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://socket.gitbook.io/docs/3-ke-hu-duan-apiclientapi/3.1-io/io_protocol.md).

# 3.1.1 io.protocpl

## IO

作为独立生成中的IO命名空间暴露，或调用 `require('socket.io client')`

```markup
<script src="/socket.io/socket.io.js"></script>

<script>
    const socket= io('http://localhost');
</script>
```

```javascript
const io= require('socket.io-client');

//或者使用import 语法

import io from "socket.io-client";
```

## io.protocol

* (Number)

协议版本号
