flymis/WebRoot/dojojs/src/io/xip_client.html

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<title></title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
	<script type="text/javascript">
	// <!--
	/*
	This file is really focused on just sending one message to the server, and
	receiving one response. The code does not expect to be re-used for multiple messages.
	This might be reworked later if performance indicates a need for it.
	
	xip fragment identifier/hash values have the form:
	#id:cmd:realUrlEncodedMessage

	id: some ID that should be unique among messages. No inherent meaning,
	        just something to make sure the hash value is unique so the message
	        receiver knows a new message is available.
	        
	cmd: command to the receiver. Valid values are:
	         - loaded: the remote frame is loaded. Only sent from server to client.
	         - ok: the message that this page sent was received OK. The next message may
	               now be sent.
	         - start: the start message of a block of messages (a complete message may
	                  need to be segmented into many messages to get around the limitiations
	                  of the size of an URL that a browser accepts.
	         - part: indicates this is a part of a message.
	         - end: the end message of a block of messages. The message can now be acted upon.
	                If the message is small enough that it doesn't need to be segmented, then
	                just one hash value message can be sent with "end" as the command.
	
	To reassemble a segmented message, the realUrlEncodedMessage parts just have to be concatenated
	together.
	*/

	//Choosing 1024 as an arbitrary limit for the URL sizes.
	//Anecdotal info seems to indicate this is safe to use in all
	//modern browsers.
	xipUrlLimit = 1024;
	xipIdCounter = 1;

	function xipInit(){
		xipIsSending = false;
		xipServerUrl = null;
		xipStateId = null;
		xipRequestData = null;
		xipCurrentHash = "";
		xipResponseMessage = "";
		xipRequestParts = [];
		xipPartIndex = 0;
		xipServerWindow = null;
	}
	xipInit();
	
	function send(stateId, ifpServerUrl, urlEncodedData){
		if(!xipIsSending){
			xipIsSending = true;

后面还有 140 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。