同步操作将从 币严数字货币交易所/ZTuoExchange_ios 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
This source code is limited to exchange and study, where it involves legal issues and I have nothing to do with it
In order to facilitate everyone to communicate and learn, please join the QQ exchange group:
*Blockchain exchange technical knowledge exchange group [QQ group: 735446452]
Instructions
The last use environment of the code is: Xcode10.0, the minimum supported version is iOS8.0
Three-party library description, part of the three-party library in this project is managed by cocoapods, and the three-party library used: cocoapods installation tutorial
Notes
Introduction to structure
Data communication socket
Socket communications in the project are all managed by the SocketManager class.
Service subscription method:
- (void)sendMsgWithLength:(int)length withsequenceId:(long)sequenceId withcmd:(short)cmd withVersion:(int)Version withRequestId:(int)RequestId withbody:(NSDictionary*)jsonDict;
This method is to subscribe to all socket links, the following is the meaning of the parameters:
Subscription message callback agent method:
- (void)delegateSocket:(GCDAsyncSocket *)sock didReadData:(NSData *)data withTag:(long)tag;
- (void)delegateSocket:(GCDAsyncSocket *)sock didReadData:(NSData *)data withTag:(long)tag {
NSData *endData = [data subdataWithRange:NSMakeRange(SOCKETRESPONSE_LENGTH, data.length -SOCKETRESPONSE_LENGTH)];
NSString *endStr= [[NSString alloc] initWithData:endData encoding:NSUTF8StringEncoding];
NSData *cmdData = [data subdataWithRange:NSMakeRange(12,2)];
uint16_t cmd=[SocketUtils uint16FromBytes:cmdData];
//cmd is the service type of the response, in order to process the corresponding business
}
common problem
Certificate error:
Path error:
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。