From 4f4d511f3a78d7e3dc357e44481cf0a7eba99b9f Mon Sep 17 00:00:00 2001 From: MDN Date: Thu, 17 Mar 2022 00:12:44 +0000 Subject: [CRON] sync translated content --- .../icecandidate_event/index.html | 66 ++++++++++++++++++++ .../conflicting/web/http/headers/cookie/index.html | 56 +++++++++++++++++ .../web/http/headers/set-cookie/index.html | 71 ++++++++++++++++++++++ 3 files changed, 193 insertions(+) create mode 100644 files/zh-cn/conflicting/web/api/rtcpeerconnection/icecandidate_event/index.html create mode 100644 files/zh-cn/conflicting/web/http/headers/cookie/index.html create mode 100644 files/zh-cn/conflicting/web/http/headers/set-cookie/index.html (limited to 'files/zh-cn/conflicting') diff --git a/files/zh-cn/conflicting/web/api/rtcpeerconnection/icecandidate_event/index.html b/files/zh-cn/conflicting/web/api/rtcpeerconnection/icecandidate_event/index.html new file mode 100644 index 0000000000..8759f7aada --- /dev/null +++ b/files/zh-cn/conflicting/web/api/rtcpeerconnection/icecandidate_event/index.html @@ -0,0 +1,66 @@ +--- +title: RTCPeerConnection.onicecandidate +slug: conflicting/Web/API/RTCPeerConnection/icecandidate_event +translation_of: Web/API/RTCPeerConnection/onicecandidate +original_slug: Web/API/RTCPeerConnection/onicecandidate +--- +

{{APIRef("WebRTC")}}

+ +

 RTCPeerConnection 的属性 {{domxref("RTCPeerConnection.onicecandidate", "onicecandidate")}} (是一个事件触发器 {{event("Event_handlers", "event handler")}}) 能够让函数在事件{{event("icecandidate")}}发生在实例  {{domxref("RTCPeerConnection")}} 上时被调用。 只要本地代理{{Glossary("ICE")}} 需要通过信令服务器传递信息给其他对等端时就会触发 这让本地代理与其他对等体相协商而浏览器本身在使用时无需知道任何详细的有关信令技术的细节,只需要简单地应用这种方法就可使用您选择的任何消息传递技术将ICE候选发送到远程对等方。

+ +

Syntax

+ +
rtcPeerConnection.onicecandidate = eventHandler;
+
+ +

Value

+ +

这应该设置为您提供的函数,该函数接受RTCPeerConnectionIceEvent表示icecandidate事件对象作为输入该功能应该通过信令服务器将可以在事件属性中找到SDP的ICE候选者传递candidate给远程对等体。

+ +

如果事件的candidate属性是null,ICE收集已经完成。不应将此消息发送到远程对等方。发生这种情况时,连接iceGatheringState也已更改为complete你不需要明确地注意这一点; 相反,如果你需要感知信令的结束,你应该注意一个icegatheringstatechange事件,表明ICE协商已经转变为complete状态。

+ +

Example

+ +

下面的示例基于文章信令和视频调用中的代码,icecandidate事件设置处理程序,以便将候选项发送到远程对等方。

+ +
pc.onicecandidate = function(event) {
+  if (event.candidate) {
+    // Send the candidate to the remote peer
+  } else {
+    // All ICE candidates have been sent
+  }
+}
+ +

请注意,当检测到协议结束时{{domxref("RTCPeerConnectionIceEvent.candidate", "candidate")}} 属性为 null.

+ +

Specifications

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
WebRTC 1.0:浏览器之间的实时通信
+ 该规范中“RTCPeerConnection.onicecandidate”的定义。
{{ Spec2('WebRTC 1.0') }}Initial specification.
+ +

浏览器兼容性

+ + + +

{{Compat("api.RTCPeerConnection.onicecandidate")}}

+ +

See also

+ + diff --git a/files/zh-cn/conflicting/web/http/headers/cookie/index.html b/files/zh-cn/conflicting/web/http/headers/cookie/index.html new file mode 100644 index 0000000000..3b17451de1 --- /dev/null +++ b/files/zh-cn/conflicting/web/http/headers/cookie/index.html @@ -0,0 +1,56 @@ +--- +title: Cookie2 +slug: conflicting/Web/HTTP/Headers/Cookie +tags: + - 废弃 + - 请求首部 + - 首部 +translation_of: Web/HTTP/Headers/Cookie2 +original_slug: Web/HTTP/Headers/Cookie2 +--- +
{{HTTPSidebar}} {{obsolete_header}}
+ +

这个已经被废弃的 Cookie2 请求首部曾经被用来告知浏览器该用户代理支持“新型” cookies,但是现代的用户代理一般使用 {{HTTPHeader("Cookie")}} 来替代 Cookie2

+ + + + + + + + + + + + +
Header type{{Glossary("Request header")}}
{{Glossary("Forbidden header name")}}yes
+ +

示例

+ +
Cookie2: $Version="1"
+ +

规范

+ + + + + + + + + + + + +
SpecificationTitle
{{RFC("2965", "Cookie2")}}Historic specification of HTTP State Management Mechanism, obsoleted by {{RFC("6265")}}
+ +

浏览器兼容性

+ +

{{Compat("http.headers.Cookie2")}}

+ +

相关内容

+ + diff --git a/files/zh-cn/conflicting/web/http/headers/set-cookie/index.html b/files/zh-cn/conflicting/web/http/headers/set-cookie/index.html new file mode 100644 index 0000000000..eab79f915f --- /dev/null +++ b/files/zh-cn/conflicting/web/http/headers/set-cookie/index.html @@ -0,0 +1,71 @@ +--- +title: Set-Cookie2 +slug: conflicting/Web/HTTP/Headers/Set-Cookie +tags: + - 废止 + - 首部 +translation_of: Web/HTTP/Headers/Set-Cookie2 +original_slug: Web/HTTP/Headers/Set-Cookie2 +--- +
{{HTTPSidebar}} {{obsolete_header}}
+ +

Set-Cookie2 是一个响应首部,已废弃使用。它被服务器用来向客户端发送 cookie 数据,但是已经在协议中被标记为不赞成使用了。请使用 {{HTTPHeader("Set-Cookie")}}  将其代替。

+ + + + + + + + + + + + +
Header type{{Glossary("Response header")}}
{{Glossary("Forbidden header name")}}no
+ +

语法

+ +
Set-Cookie2: <cookie-name>=<cookie-value>
+Set-Cookie2: <cookie-name>=<cookie-value>; Comment=<value>
+Set-Cookie2: <cookie-name>=<cookie-value>; CommentURL=<http-url>
+Set-Cookie2: <cookie-name>=<cookie-value>; Discard
+Set-Cookie2: <cookie-name>=<cookie-value>; Domain=<domain-value>
+Set-Cookie2: <cookie-name>=<cookie-value>; Max-Age=<non-zero-digit>
+Set-Cookie2: <cookie-name>=<cookie-value>; Path=<path-value>
+Set-Cookie2: <cookie-name>=<cookie-value>; Port=<port-number>
+Set-Cookie2: <cookie-name>=<cookie-value>; Secure
+Set-Cookie2: <cookie-name>=<cookie-value>; Version=<version-number>
+
+// Multiple directives are also possible, for example:
+Set-Cookie2: <cookie-name>=<cookie-value>; Domain=<domain-value>; Secure
+
+// Multiple cookies are seperated by a comma
+Set-Cookie2: <cookie-name>=<cookie-value>, <cookie-name>=<cookie-value>, ...
+
+ +

规范

+ + + + + + + + + + + + +
SpecificationTitle
{{RFC("2965", "Set-Cookie2")}}Historic specification of HTTP State Management Mechanism, obsoleted by {{RFC("6265")}}
+ +

浏览器兼容性

+ +

{{Compat("http.headers.Set-Cookie2")}}

+ +

相关内容

+ + -- cgit v1.2.3-54-g00ecf