fa45d8aa5f
- health_checklist.json: 192.168.1.122→node122
- ocr_client.py: docstring IP→node122
- docs/market-data-requirements.md: IP→node122
- 所有API调用通过ProxyHandler({})绕过系统代理
Privoxy对node122:18003返回500,直连正常
18 lines
489 B
Python
18 lines
489 B
Python
# -*- coding:utf-8 -*-
|
|
"""
|
|
封装消息头
|
|
@author: baostock.com
|
|
@group : baostock.com
|
|
@contact: baostock@163.com
|
|
"""
|
|
import baostock.common.contants as cons
|
|
import baostock.util.stringutil as strutil
|
|
|
|
|
|
def to_message_header(msg_type, total_msg_length):
|
|
|
|
return_str = cons.BAOSTOCK_CLIENT_VERSION + cons.MESSAGE_SPLIT + msg_type \
|
|
+ cons.MESSAGE_SPLIT \
|
|
+ strutil.add_zero_for_string(total_msg_length, 10, True)
|
|
return return_str
|