Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 377 Bytes

io_protocol.md

File metadata and controls

26 lines (16 loc) · 377 Bytes

IO

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

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

<script>
    const socket= io('http://localhost');
</script>
const io= require('socket.io-client');

//或者使用import 语法

import io from "socket.io-client";

io.protocol

  • (Number)

协议版本号