From 218934fa2ed1c702a6d3923d2aa2cc6b43c48684 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:43:23 -0500 Subject: initial commit --- files/tr/web/api/websocket/binarytype/index.html | 55 +++++++++ files/tr/web/api/websocket/close/index.html | 66 +++++++++++ files/tr/web/api/websocket/extensions/index.html | 46 ++++++++ files/tr/web/api/websocket/index.html | 138 +++++++++++++++++++++++ files/tr/web/api/websocket/onclose/index.html | 42 +++++++ files/tr/web/api/websocket/onerror/index.html | 48 ++++++++ files/tr/web/api/websocket/onmessage/index.html | 48 ++++++++ files/tr/web/api/websocket/onopen/index.html | 48 ++++++++ files/tr/web/api/websocket/protocol/index.html | 46 ++++++++ files/tr/web/api/websocket/readystate/index.html | 76 +++++++++++++ files/tr/web/api/websocket/url/index.html | 48 ++++++++ files/tr/web/api/websocket/websocket/index.html | 56 +++++++++ 12 files changed, 717 insertions(+) create mode 100644 files/tr/web/api/websocket/binarytype/index.html create mode 100644 files/tr/web/api/websocket/close/index.html create mode 100644 files/tr/web/api/websocket/extensions/index.html create mode 100644 files/tr/web/api/websocket/index.html create mode 100644 files/tr/web/api/websocket/onclose/index.html create mode 100644 files/tr/web/api/websocket/onerror/index.html create mode 100644 files/tr/web/api/websocket/onmessage/index.html create mode 100644 files/tr/web/api/websocket/onopen/index.html create mode 100644 files/tr/web/api/websocket/protocol/index.html create mode 100644 files/tr/web/api/websocket/readystate/index.html create mode 100644 files/tr/web/api/websocket/url/index.html create mode 100644 files/tr/web/api/websocket/websocket/index.html (limited to 'files/tr/web/api/websocket') diff --git a/files/tr/web/api/websocket/binarytype/index.html b/files/tr/web/api/websocket/binarytype/index.html new file mode 100644 index 0000000000..cb354a0dfb --- /dev/null +++ b/files/tr/web/api/websocket/binarytype/index.html @@ -0,0 +1,55 @@ +--- +title: WebSocket.binaryType +slug: Web/API/WebSocket/binaryType +tags: + - API + - Web API + - WebSocket + - Özellik +translation_of: Web/API/WebSocket/binaryType +--- +

{{APIRef("Web Sockets API")}}

+ +

WebSocket.binaryType özelliği, bağlantıda iletilen verinin ikilik veri tipini verir.

+ +

Sözdizim

+ +
var binaryType = aWebSocket.binaryType;
+ +

Değer

+ +

Bir {{DOMXref("DOMString")}}:

+ +
+
"blob"
+
Eğer {{domxref("Blob")}} objeleri kullanıldıysa.
+
"arraybuffer"
+
Eğer {{jsxref("ArrayBuffer")}} objeleri kullanıldıysa. +

 

+
+
+ +

Belirtimler

+ + + + + + + + + + + + + + + + +
BelirtimDurumYorum
{{SpecName('HTML WHATWG', '#dom-websocket-binarytype', 'WebSocket: binaryType')}}{{Spec2('HTML WHATWG')}}İlk tanım
+ +

Tarayıcı desteği

+ + + +

{{Compat("api.WebSocket.binaryType")}}

diff --git a/files/tr/web/api/websocket/close/index.html b/files/tr/web/api/websocket/close/index.html new file mode 100644 index 0000000000..44d935c025 --- /dev/null +++ b/files/tr/web/api/websocket/close/index.html @@ -0,0 +1,66 @@ +--- +title: WebSocket.close() +slug: Web/API/WebSocket/close +tags: + - API + - Web API + - WebSocket + - Yöntem +translation_of: Web/API/WebSocket/close +--- +

{{APIRef("Web Sockets API")}}

+ +

WebSocket.close() yöntemi, eğer varsa, {{domxref("WebSocket")}} bağlantısını kapatır. Eğer bağlantı zaten CLOSED ise, hiç bir şey yapmaz.

+ +

Sözdizim

+ +
WebSocket.close();
+ +

Parametreler

+ +
+
code {{optional_inline}}
+
Bir bağlantının neden kapandığını açıklayan durum kodunu belirten bir sayısal değerdir. Eğer parametre belirtilmediyse, varsayılan değer olan 1005 kullanılır. Ayrıca {{domxref("CloseEvent")}} için izin verilen durum kodu listesine bakınız.
+
+ +
+
reason {{optional_inline}}
+
Neden bağlantının kapandığını belirten okunabilir bir dizidir. Bu dizi 123 byte boyutunda UTF-8 yazısından daha uzun olmamalıdır. (karakterler değil)
+
+ +

Olağandışı durumlar

+ +
+
INVALID_ACCESS_ERR
+
code parametresine geçersiz bir durum kodu girildi.
+
SYNTAX_ERR
+
reason dizisi çok uzun ya da eşleştirilmemiş naipler içeriyor.
+
+ +
+

Not: Gecko'da, bu yöntem 8.0'dan önce hiç bir parametreyi desteklemiyor. {{geckoRelease("8.0")}}.

+
+ +

Belirtimler

+ + + + + + + + + + + + + + +
BelirtimDurumYorum
HTML Living Standard
+ The definition of 'WebSocket.close()' in that specification.
Living Standardİlk tanım
+ +

Tarayıcı desteği

+ + + +

{{Compat("api.WebSocket.close")}}

diff --git a/files/tr/web/api/websocket/extensions/index.html b/files/tr/web/api/websocket/extensions/index.html new file mode 100644 index 0000000000..55b7cbb914 --- /dev/null +++ b/files/tr/web/api/websocket/extensions/index.html @@ -0,0 +1,46 @@ +--- +title: WebSocket.extensions +slug: Web/API/WebSocket/extensions +tags: + - API + - Web API + - WebSocket + - Özellik +translation_of: Web/API/WebSocket/extensions +--- +

{{APIRef("Web Sockets API")}}

+ +

Salt-okunur WebSocket.extensions özelliği, sunucunun seçtiği uzantıları verir. Şu anlık boş bir dizi ya da bağlantı tarafından uzlaşılan uzantıların listesidir.

+ +

Sözdizim

+ +
var extensions = aWebSocket.extensions;
+ +

Değer

+ +

Bir {{domxref("DOMString")}}.

+ +

Belirtimler

+ + + + + + + + + + + + + + + + +
BelirtimDurumYorum
{{SpecName('HTML WHATWG', '#dom-websocket-extensions', 'WebSocket: extensions')}}{{Spec2('HTML WHATWG')}}İlk tanım
+ +

Tarayıcı desteği

+ + + +

{{Compat("api.WebSocket.extensions")}}

diff --git a/files/tr/web/api/websocket/index.html b/files/tr/web/api/websocket/index.html new file mode 100644 index 0000000000..ce8a030def --- /dev/null +++ b/files/tr/web/api/websocket/index.html @@ -0,0 +1,138 @@ +--- +title: WebSocket +slug: Web/API/WebSocket +tags: + - API + - WebSocket + - WebSockets +translation_of: Web/API/WebSocket +--- +
{{APIRef("Web Sockets API")}}
+ +

WebSocket, bir WebSocket sunucusuyla bağlantı kurmak ve bağlantıyı yönetmek için bir uygulama programlama arayüzü (API) sunar.

+ +

WebSocket'i kurmak için WebSocket() yapısını kullanın.

+ +

Yapılar

+ +
+
{{domxref("WebSocket.WebSocket", "WebSocket(url[, protocols])")}}
+
Yeni oluşturulmuş bir WebSocket objesi verir.
+
+ +

Sabitler

+ + + + + + + + + + + + + + + + + + + + + + + + +
SabitDeğer
WebSocket.CONNECTING0
WebSocket.OPEN1
WebSocket.CLOSING2
WebSocket.CLOSED3
+ +

Özellikler

+ +
+
{{domxref("WebSocket.binaryType")}}
+
Bağlantıda kurulan ikilik veri tipi.
+
{{domxref("WebSocket.bufferedAmount")}} {{readonlyinline}}
+
Kuyruktaki değerlerin byte sayıları.
+
{{domxref("WebSocket.extensions")}} {{readonlyinline}}
+
Sunucu tarafından seçilmiş uzantılar.
+
{{domxref("WebSocket.onclose")}}
+
Bağlantı kapandığında çağırılan olay dinleyicisi.
+
{{domxref("WebSocket.onerror")}}
+
Hata oluştuğunda çağırılan olay dinleyicisi.
+
{{domxref("WebSocket.onmessage")}}
+
Sunucudan mesaj alındığında çağırılan olay dinleyicisi.
+
{{domxref("WebSocket.onopen")}}
+
Bağlantı kurulduğunda çağırılan olay dinleyicisi.
+
{{domxref("WebSocket.protocol")}} {{readonlyinline}}
+
Sunucu tarafından seçilmiş alt-protokol.
+
{{domxref("WebSocket.readyState")}} {{readonlyinline}}
+
Bağlantının şimdiki durumu.
+
{{domxref("WebSocket.url")}} {{readonlyinline}}
+
WebSocket'in mutlak URL'si.
+
+ +

Yöntemler

+ +
+
{{domxref("WebSocket.close", "WebSocket.close([code[, reason]])")}}
+
Bağlantıyı kapatır.
+
{{domxref("WebSocket.send", "WebSocket.send(data)")}}
+
İletilmek üzere veriyi kuyruğa ekler.
+
+ +

Örnek

+ +

 

+ +
// WebSocket bağlantısı kur
+const socket = new WebSocket('ws://localhost:8080');
+
+// Bağlantı kurulduğunda
+socket.addEventListener('open', function (event) {
+    socket.send('Sunucuya bağlanıldı.');
+});
+
+// Mesaj alındığında
+socket.addEventListener('message', function (event) {
+    console.log('Mesaj alındı: ', event.data);
+});
+
+// Mesaj gönder
+socket.send('Merhaba!');
+
+// Bağlantıyı bitir
+socket.close(1000, 'Güle güle.');
+ +

 

+ +

Belirtimler

+ + + + + + + + + + + + + + +
BelirtimDurumYorum
{{SpecName("HTML WHATWG", "web-sockets.html#the-websocket-interface", "WebSocket")}}{{Spec2("HTML WHATWG")}}İlk tanım
+ +

Tarayıcı desteği

+ +
+ + +

{{Compat("api.WebSocket")}}

+
+ +

Ayrıca bakınız

+ + diff --git a/files/tr/web/api/websocket/onclose/index.html b/files/tr/web/api/websocket/onclose/index.html new file mode 100644 index 0000000000..5df92f3634 --- /dev/null +++ b/files/tr/web/api/websocket/onclose/index.html @@ -0,0 +1,42 @@ +--- +title: WebSocket.onclose +slug: Web/API/WebSocket/onclose +tags: + - API + - Web API + - WebSocket + - Özellik +translation_of: Web/API/WebSocket/onclose +--- +

{{APIRef("Web Sockets API")}}

+ +

WebSocket.onclose özelliği bağlantının {{domxref("WebSocket.readyState","readyState")}} özelliği {{domxref("WebSocket.readyState","CLOSED")}} olduğunda çağırılan bir {{domxref("EventHandler")}}'dır. {{domxref("CloseEvent")}} ile birlikte çağırılır.

+ +

Sözdizim

+ +
aWebSocket.onclose = function(event) {
+  console.log("WebSocket is closed now.");
+};
+ +

Değer

+ +

Bir {{domxref("EventListener")}}.

+ +

Belirtimler

+ + + + + + + + + + + + + + + + +
BelirtimDurumYorum
{{SpecName('HTML WHATWG', '#handler-websocket-onclose', 'WebSocket: onclose')}}{{Spec2('HTML WHATWG')}}İlk tanım
diff --git a/files/tr/web/api/websocket/onerror/index.html b/files/tr/web/api/websocket/onerror/index.html new file mode 100644 index 0000000000..62cc321a79 --- /dev/null +++ b/files/tr/web/api/websocket/onerror/index.html @@ -0,0 +1,48 @@ +--- +title: WebSocket.onerror +slug: Web/API/WebSocket/onerror +tags: + - API + - Web API + - WebSocket + - Özellik +translation_of: Web/API/WebSocket/onerror +--- +

{{APIRef("Web Sockets API")}}

+ +

WebSocket.onerror özelliği hata oluştuğunda çağırılan bir {{domxref("EventHandler")}}'dır. {{domxref("Event")}} ile birlikte çağırılır.

+ +

Sözdizim

+ +
aWebSocket.onerror = function(event) {
+  console.error("WebSocket error observed:", event);
+};
+ +

Değer

+ +

Bir {{domxref("EventListener")}}.

+ +

Belirtimler

+ + + + + + + + + + + + + + + + +
BelirtimDurumYorum
{{SpecName('HTML WHATWG', '#handler-websocket-onerror', 'WebSocket: onerror')}}{{Spec2('HTML WHATWG')}}İlk tanım
+ +

Tarayıcı desteği

+ + + +

{{Compat("api.WebSocket.onerror")}}

diff --git a/files/tr/web/api/websocket/onmessage/index.html b/files/tr/web/api/websocket/onmessage/index.html new file mode 100644 index 0000000000..0ea1dd34c8 --- /dev/null +++ b/files/tr/web/api/websocket/onmessage/index.html @@ -0,0 +1,48 @@ +--- +title: WebSocket.onmessage +slug: Web/API/WebSocket/onmessage +tags: + - API + - Web API + - WebSocket + - Özellik +translation_of: Web/API/WebSocket/onmessage +--- +

{{APIRef("Web Sockets API")}}

+ +

WebSocket.onmessage özelliği sunucu tarafından mesaj iletildiğinde çağırılan bir {{domxref("EventHandler")}}'dir. {{domxref("MessageEvent")}} ile çağırılır..

+ +

Sözdizim

+ +
aWebSocket.onmessage = function(event) {
+  console.debug("WebSocket message received:", event);
+};
+ +

Değer

+ +

Bir {{domxref("EventListener")}}.

+ +

Belirtimler

+ + + + + + + + + + + + + + + + +
BelirtimDurumYorum
{{SpecName('HTML WHATWG', '#handler-websocket-onmessage', 'WebSocket: onmessage')}}{{Spec2('HTML WHATWG')}}İlk tanım
+ +

Tarayıcı desteği

+ + + +

{{Compat("api.WebSocket.onmessage")}}

diff --git a/files/tr/web/api/websocket/onopen/index.html b/files/tr/web/api/websocket/onopen/index.html new file mode 100644 index 0000000000..6ce9a90f75 --- /dev/null +++ b/files/tr/web/api/websocket/onopen/index.html @@ -0,0 +1,48 @@ +--- +title: WebSocket.onopen +slug: Web/API/WebSocket/onopen +tags: + - API + - Web API + - WebSocket + - Özellik +translation_of: Web/API/WebSocket/onopen +--- +

{{APIRef("Web Sockets API")}}

+ +

WebSocket.onopen özelliği bağlantının {{domxref("WebSocket.readyState","readyState")}} özelliği  {{domxref("WebSocket.readyState","1")}} olduğunda çağırılan bir {{domxref("EventHandler")}}'dir. Bu bağlantının veri alışverişine hazır olduğunu belirtir. {{domxref("Event")}} ile birlikte çağırılır.

+ +

Sözdizim

+ +
aWebSocket.onopen = function(event) {
+  console.log("WebSocket ile bağlantı kuruldu.");
+};
+ +

Değer

+ +

Bir {{domxref("EventListener")}}.

+ +

Belirtimler

+ + + + + + + + + + + + + + + + +
BelirtimDurumYorum
{{SpecName('HTML WHATWG', '#handler-websocket-onopen', 'WebSocket: onopen')}}{{Spec2('HTML WHATWG')}}İlk tanım
+ +

Tarayıcı desteği

+ + + +

{{Compat("api.WebSocket.onopen")}}

diff --git a/files/tr/web/api/websocket/protocol/index.html b/files/tr/web/api/websocket/protocol/index.html new file mode 100644 index 0000000000..d3a466d14b --- /dev/null +++ b/files/tr/web/api/websocket/protocol/index.html @@ -0,0 +1,46 @@ +--- +title: WebSocket.protocol +slug: Web/API/WebSocket/protocol +tags: + - API + - Web API + - WebSocket + - Özellik +translation_of: Web/API/WebSocket/protocol +--- +

{{APIRef("Web Sockets API")}}

+ +

Salt-okunur WebSocket.protocol özelliği sunucunun seçtiği alt-protokolü verir. Bu değer {{domxref("WebSocket")}} objesi oluşturulurken belirtilen protocols dizisidir.

+ +

Sözdizim

+ +
var protocol = aWebSocket.protocol;
+ +

Değer

+ +

Bir DOMString.

+ +

Belirtimler

+ + + + + + + + + + + + + + + + +
BelirtimDurumYorum
{{SpecName('HTML WHATWG', '#dom-websocket-protocol', 'WebSocket: protocol')}}{{Spec2('HTML WHATWG')}}İlk tanım
+ +

Tarayıcı desteği

+ + + +

{{Compat("api.WebSocket.protocol")}}

diff --git a/files/tr/web/api/websocket/readystate/index.html b/files/tr/web/api/websocket/readystate/index.html new file mode 100644 index 0000000000..1f657428d5 --- /dev/null +++ b/files/tr/web/api/websocket/readystate/index.html @@ -0,0 +1,76 @@ +--- +title: WebSocket.readyState +slug: Web/API/WebSocket/readyState +tags: + - API + - Web API + - WebSocket + - Özellik +translation_of: Web/API/WebSocket/readyState +--- +

{{APIRef("Web Sockets API")}}

+ +

Salt-okunur WebSocket.readyState özelliği {{domxref("WebSocket")}} bağlantısının durumunu verir.

+ +

Sözdizim

+ +
var readyState = aWebSocket.readyState;
+ +

Değer

+ +

Aşağıdaki herhangi bir unsigned short değeri:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DeğerDurumAçıklama
0CONNECTINGSoket oluşuturuldu ama henüz bağlanmadı.
1OPENBağlantı kuruldu ve iletişime hazır.
2CLOSINGBağlantı kapatılıyor.
3CLOSEDBağlantı kapatıldı ya da açılamadı.
+ +

Belirtimler

+ + + + + + + + + + + + + + + + +
BelirtimDurumYorum
{{SpecName('HTML WHATWG', '#dom-websocket-readystate', 'WebSocket: readyState')}}{{Spec2('HTML WHATWG')}}İlk tanım
+ +

Tarayıcı desteği

+ + + +

{{Compat("api.WebSocket.readyState")}}

diff --git a/files/tr/web/api/websocket/url/index.html b/files/tr/web/api/websocket/url/index.html new file mode 100644 index 0000000000..b824519c09 --- /dev/null +++ b/files/tr/web/api/websocket/url/index.html @@ -0,0 +1,48 @@ +--- +title: WebSocket.url +slug: Web/API/WebSocket/url +tags: + - API + - Web API + - WebSocket + - Özellik +translation_of: Web/API/WebSocket/url +--- +

{{APIRef("Web Sockets API")}}

+ +

Salt-okunur WebSocket.url özelliği {{domxref("WebSocket")}} yapısının mutlak URL'sini verir.

+ +

Sözdizim

+ +
var url = aWebSocket.url;
+ +

 

+ +

Değer

+ +

Bir DOMString.

+ +

Belirtimler

+ + + + + + + + + + + + + + + + +
BelirtimDurumYorum
{{SpecName('HTML WHATWG', '#dom-websocket-url', 'WebSocket: url')}}{{Spec2('HTML WHATWG')}}İlk tanım
+ +

Tarayıcı desteği

+ + + +

{{Compat("api.WebSocket.url")}}

diff --git a/files/tr/web/api/websocket/websocket/index.html b/files/tr/web/api/websocket/websocket/index.html new file mode 100644 index 0000000000..f609e96743 --- /dev/null +++ b/files/tr/web/api/websocket/websocket/index.html @@ -0,0 +1,56 @@ +--- +title: WebSocket() +slug: Web/API/WebSocket/WebSocket +tags: + - API + - Web API + - WebSocket + - Yapı +translation_of: Web/API/WebSocket/WebSocket +--- +

{{APIRef("Web Sockets API")}}

+ +

WebSocket() yapısı bir {{domxref("WebSocket")}} objesi verir.

+ +

Sözdizim

+ +
var aWebSocket = new WebSocket(uri [, protocols]);
+ +

Parametreler

+ +
+
url
+
Bağlanılacak sunucunun URL'si.
+
protocols {{optional_inline}}
+
Tek bir protokol dizisi ya da protokol dizilerinin bulunduğu bir küme. Bu diziler alt-protokol olarak belirtilmek amacıyla kullanılır, yani tek bir sunucu çoklu alt-protokoller uygulayabilir (örnek olarak bir sunucunun başka türlü etkileşimleri belirli protokola bağlı olarak idare edebilmek isteyebilirsiniz.). Eğer bir protokol dizisi belirtmediyseniz boş bir dizi kullanılır.
+
+ +

Olağandışı durumlar

+ +
+
SECURITY_ERR
+
Bağlanılmaya çalışılan port engellenmiş.
+
+ +

Belirtimler

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', '#dom-websocket', 'the WebSocket constructor')}}{{Spec2('HTML WHATWG')}} 
+ +

Tarayıcı desteği

+ + + +

{{Compat("api.WebSocket.WebSocket")}}

-- cgit v1.2.3-54-g00ecf