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,直连正常
22 lines
567 B
Python
22 lines
567 B
Python
# -*- coding:utf-8 -*-
|
|
"""
|
|
封装消息接口
|
|
@author: baostock.com
|
|
@group : baostock.com
|
|
@contact: baostock@163.com
|
|
"""
|
|
import baostock.common.contants as cons
|
|
|
|
|
|
class MessageHeader(object):
|
|
|
|
def __init__(self, msg_type, total_msg_length):
|
|
self.version = cons.BAOSTOCK_CLIENT_VERSION
|
|
self.msg_type = msg_type
|
|
self.total_msg_length = total_msg_length
|
|
|
|
def to_message_header_msg(self):
|
|
return self.version + cons.MESSAGE_SPLIT + self.msg_type \
|
|
+ cons.MESSAGE_SPLIT + self.total_msg_length
|
|
|