cocos2d-x 支持ipv6吗?
var xhr = XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject(“MSXML2.XMLHTTP”);
我们采用的是 XMLHttpRequest ,首先我自己按照苹果ipv6模拟环境测试了,具体方式在这个地址http://blog.csdn.net/ws1836300/article/details/52280130
,没问题,服务器也可以支持ipv6的查询 命令如下dig +nocmd +nostats app.chaoren.daxianghuyu.com 。但是被苹果审核给拒绝了,其中一个原因就是这个问题。特此问个究竟3.7.1完全支持ipv6了没有? 为什么我自己测试ok,难不成我的测试环境有问题?另外贴出来几个抓包数据!
No. Time Source Destination Protocol Length Info
208 96.138335 2001:aab1:98e7:e5ef:fb1a:2273 20010:1baa::771d:613e HTTP 232 POST /domain-web/user/authToken HTTP/1.1 (application/json)
Frame 208: 232 bytes on wire (1856 bits), 232 bytes captured (1856 bits) on interface 0
Interface id: 0 (en1)
Encapsulation type: Ethernet (1)
Arrival Time: Apr 24, 2017 16:52:59.265567000 CST
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1493023979.265567000 seconds
[Time delta from previous captured frame: 0.000551000 seconds]
[Time delta from previous displayed frame: 0.258280000 seconds]
[Time since reference or first frame: 96.138335000 seconds]
Frame Number: 208
Frame Length: 232 bytes (1856 bits)
Capture Length: 232 bytes (1856 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:ethertype:ipv6:tcp:http:json]
[Coloring Rule Name: HTTP]
[Coloring Rule String: http || tcp.port == 80 || http2]
Ethernet II, Src: Apple_96:a7:28 (e0:b9:ba:96:a7:28), Dst: aa:20:66:92:e3:64 (aa:20:66:92:e3:64)
Destination: aa:20:66:92:e3:64 (aa:20:66:92:e3:64)
Address: aa:20:66:92:e3:64 (aa:20:66:92:e3:64)
… …1. … … … … = LG bit: Locally administered address (this is NOT the factory default)
… …0 … … … … = IG bit: Individual address (unicast)
Source: Apple_96:a7:28 (e0:b9:ba:96:a7:28)
Address: Apple_96:a7:28 (e0:b9:ba:96:a7:28)
… …0. … … … … = LG bit: Globally unique address (factory default)
… …0 … … … … = IG bit: Individual address (unicast)
Type: IPv6 (0x86dd)
Internet Protocol Version 6, Src: 2001:aab1:98e7:e5ef:fb1a:2273, Dst: 20010:1baa::771d:613e
0110 … = Version: 6
… 0000 0000 … … … … … = Traffic class: 0x00 (DSCP: CS0, ECN: Not-ECT)
… … … 0011 0000 0000 1000 0011 = Flow label: 0x30083
Payload length: 178
Next header: TCP (6)
Hop limit: 64
Source: 2001:aab1:98e7:e5ef:fb1a:2273
Destination: 20010:1baa::771d:613e
[Source GeoIP: Unknown]
[Destination GeoIP: Unknown]
Transmission Control Protocol, Src Port: 52861, Dst Port: 80, Seq: 306, Ack: 1, Len: 146
Source Port: 52861
Destination Port: 80
[Stream index: 7]
[TCP Segment Len: 146]
Sequence number: 306 (relative sequence number)
[Next sequence number: 452 (relative sequence number)]
Acknowledgment number: 1 (relative ack number)
Header Length: 32 bytes
Flags: 0x018 (PSH, ACK)
Window size value: 8207
[Calculated window size: 131312]
[Window size scaling factor: 16]
Checksum: 0x4f6e [unverified]
[Checksum Status: Unverified]
Urgent pointer: 0
Options: (12 bytes), No-Operation (NOP), No-Operation (NOP), Timestamps
[SEQ/ACK analysis]
TCP segment data (146 bytes)
[2 Reassembled TCP Segments (451 bytes): #207(305), #208(146)]
[Frame: 207, payload: 0-304 (305 bytes)]
[Frame: 208, payload: 305-450 (146 bytes)]
[Segment count: 2]
[Reassembled TCP length: 451]
[Reassembled TCP Data: 504f5354202f646f6d61696e2d7765622f757365722f6175…]
Hypertext Transfer Protocol
POST /domain-web/user/authToken HTTP/1.1\r\n
Host: app.chaoren.daxianghuyu.com\r\n
Accept-Encoding: gzip, deflate\r\n
Content-Type: application/json;charset=UTF-8\r\n
Content-Length: 146\r\n
Accept-Language: zh-cn\r\n
Accept: /\r\n
Connection: keep-alive\r\n
User-Agent: Superman-mobile/1.0 CFNetwork/758.5.3 Darwin/15.6.0\r\n
\r\n
[Full request URI: http://app.chaoren.daxianghuyu.com/domain-web/user/authToken]
[HTTP request 1/2]
[Response in frame: 211]
[Next request in frame: 215]
File Data: 146 bytes
JavaScript Object Notation: application/json
证明我这边测试ok是用ipv6!!!确保ok就可以向苹果申诉!如果有问题,麻烦指出来!