4.3.4 • Published 9 months ago
@kim5257/socket.io-parser-bigint v4.3.4
socket.io-parser-bigint
This package extended from socket.io-parser to support bigint type.
A socket.io encoder and decoder written in JavaScript complying with version 5
of socket.io-protocol.
Used by socket.io and
socket.io-client.
Compatibility table:
Parser version | Socket.IO server version | Protocol revision |
---|---|---|
4.x | 4.x | 5 |
Parser API
socket.io-parser is the reference implementation of socket.io-protocol. Read the full API here: socket.io-protocol.
Example Usage
Replace socket.io default parser
import * as SocketIOParser from '@kim5257/socket.io-parser-bigint';
import { Server, Socket } from 'socket.io';
const server = new Server(3000, {
parser: SocketIOParser,
});
Replace socket.io-client default parser
import * as SocketIOParser from '@kim5257/socket.io-parser-bigint';
import SocketIO from 'socket.io-client';
const client = SocketIO('http://localhost:3000', {
parser: SocketIOParser,
});
See the test suite for more examples of how socket.io-parser is used.
License
MIT