mirror of
https://github.com/longbridge/developers.git
synced 2026-09-19 03:34:09 +08:00
845 B
845 B
title, id, slug, sidebar_position
| title | id | slug | sidebar_position |
|---|---|---|---|
| Access differences between WebSocket and TCP | diff-ws-tcp | /socket/diff_ws_tcp | 6 |
LongPort support WebSocket and TCP feed, the differences:
- Data of
TCPis streaming, so coding client is hard thanWebSocket. WebSocketusing URL Query to HandshakeWebSocketusing ping-pong to do Heartbeating, instead of sending heartbeat packet.WebSocketusingTLSto secure connection, butTCPdo not.
User can choice TCP or WebSocket on self demand.
Advice: Using
WebSocketfirst, it is more simple. If want more quick stock quote real-time pushing, usingTCPto access stock quote gateway.