﻿
{"id":17866,"date":"2020-09-23T09:23:24","date_gmt":"2020-09-23T09:23:24","guid":{"rendered":"https:\/\/www.gencayyildiz.com\/blog\/?p=17866"},"modified":"2020-09-23T09:23:24","modified_gmt":"2020-09-23T09:23:24","slug":"asp-net-core-signalr-serisi-8-clients-turleri-ve-kullanilan-metotlar-caller-all-others","status":"publish","type":"post","link":"https:\/\/www.gencayyildiz.com\/blog\/asp-net-core-signalr-serisi-8-clients-turleri-ve-kullanilan-metotlar-caller-all-others\/","title":{"rendered":"Asp.NET Core &#8211; SignalR Serisi #8 &#8211; Clients T\u00fcrleri ve Kullan\u0131lan Metotlar &#8211; Caller | All | Others"},"content":{"rendered":"<div id=\"fb-root\"><\/div>\n<p>Merhaba,<\/p>\n<p>SignalR Hub s\u0131n\u0131flar\u0131, client ile server aras\u0131nda e\u015fzamanl\u0131 etkile\u015fimi kurabilmek ve server&#8217;a ba\u011fl\u0131 olan client&#8217;lar aras\u0131nda iste\u011fe \u00f6zel farkl\u0131 davran\u0131\u015flar sergileyebilmek i\u00e7in Caller, All ve Others \u00f6zelliklerini i\u00e7ermektedir. Bu i\u00e7eri\u011fimizde, bu \u00f6zelliklerin davran\u0131\u015flar\u0131n\u0131 detaylar\u0131yla inceleyecek ve ard\u0131ndan genel olarak kullan\u0131lan metotlar\u0131 de\u011ferlendirece\u011fiz.<\/p>\n<p><strong style=\"color: #e83e8c;\">Client T\u00fcrleri<\/strong><br \/>\nDavran\u0131\u015fa g\u00f6re client t\u00fcrleri yukar\u0131da da bahsedildi\u011fi gibi Caller, All ve Others olmak \u00fczere \u00fc\u00e7e ayr\u0131l\u0131r;<\/p>\n<table>\n<tbody>\n<tr>\n<td style=\"vertical-align: text-top;\"><strong>Caller<\/strong><br \/>\n<a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-\u2013-SignalR-Serisi-8-\u2013-Clients-Turleri-ve-Kullanilan-Metotlar-\u2013-Caller-All-Others-2.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-\u2013-SignalR-Serisi-8-\u2013-Clients-Turleri-ve-Kullanilan-Metotlar-\u2013-Caller-All-Others-2-150x150.jpg\" alt=\"Asp.NET Core \u2013 SignalR Serisi #8 \u2013 Clients T\u00fcrleri ve Kullan\u0131lan Metotlar \u2013 Caller | All | Others\" width=\"150\" height=\"150\" class=\"aligncenter size-thumbnail wp-image-17895\" srcset=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-\u2013-SignalR-Serisi-8-\u2013-Clients-Turleri-ve-Kullanilan-Metotlar-\u2013-Caller-All-Others-2-150x150.jpg 150w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-\u2013-SignalR-Serisi-8-\u2013-Clients-Turleri-ve-Kullanilan-Metotlar-\u2013-Caller-All-Others-2-160x160.jpg 160w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-\u2013-SignalR-Serisi-8-\u2013-Clients-Turleri-ve-Kullanilan-Metotlar-\u2013-Caller-All-Others-2-320x320.jpg 320w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a>\n<\/td>\n<td style=\"text-align:left;\">Sadece server&#8217;a bildirim g\u00f6nderen client&#8217;la ileti\u015fim kurar.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n    public class MyHub : Hub\r\n    {\r\n        public async Task SendCallerMessage(string message)\r\n        {\r\n            await Clients.Caller.SendAsync(&quot;receiveMessage&quot;, message);\r\n        }\r\n    }\r\n<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"vertical-align: text-top;\"><strong>All<\/strong><br \/>\n<a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-\u2013-SignalR-Serisi-8-\u2013-Clients-Turleri-ve-Kullanilan-Metotlar-\u2013-Caller-All-Others.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-\u2013-SignalR-Serisi-8-\u2013-Clients-Turleri-ve-Kullanilan-Metotlar-\u2013-Caller-All-Others-150x150.jpg\" alt=\"Asp.NET Core \u2013 SignalR Serisi #8 \u2013 Clients T\u00fcrleri ve Kullan\u0131lan Metotlar \u2013 Caller | All | Others\" width=\"150\" height=\"150\" class=\"aligncenter size-thumbnail wp-image-17887\" srcset=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-\u2013-SignalR-Serisi-8-\u2013-Clients-Turleri-ve-Kullanilan-Metotlar-\u2013-Caller-All-Others-150x150.jpg 150w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-\u2013-SignalR-Serisi-8-\u2013-Clients-Turleri-ve-Kullanilan-Metotlar-\u2013-Caller-All-Others-160x160.jpg 160w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-\u2013-SignalR-Serisi-8-\u2013-Clients-Turleri-ve-Kullanilan-Metotlar-\u2013-Caller-All-Others-320x320.jpg 320w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a><\/td>\n<td style=\"text-align:left;\">Server&#8217;a ba\u011fl\u0131 olan t\u00fcm client&#8217;lara bildiri g\u00f6nderir.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n    public class MyHub : Hub\r\n    {\r\n        public async Task SendAllMessage(string message)\r\n        {\r\n            await Clients.All.SendAsync(&quot;receiveMessage&quot;, message);\r\n        }\r\n    }\r\n<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"vertical-align: text-top;\"><strong>Others<\/strong><br \/>\n<a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-\u2013-SignalR-Serisi-8-\u2013-Clients-Turleri-ve-Kullanilan-Metotlar-\u2013-Caller-All-Others-1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-\u2013-SignalR-Serisi-8-\u2013-Clients-Turleri-ve-Kullanilan-Metotlar-\u2013-Caller-All-Others-1-150x150.jpg\" alt=\"Asp.NET Core \u2013 SignalR Serisi #8 \u2013 Clients T\u00fcrleri ve Kullan\u0131lan Metotlar \u2013 Caller | All | Others\" width=\"150\" height=\"150\" class=\"aligncenter size-thumbnail wp-image-17893\" srcset=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-\u2013-SignalR-Serisi-8-\u2013-Clients-Turleri-ve-Kullanilan-Metotlar-\u2013-Caller-All-Others-1-150x150.jpg 150w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-\u2013-SignalR-Serisi-8-\u2013-Clients-Turleri-ve-Kullanilan-Metotlar-\u2013-Caller-All-Others-1-300x297.jpg 300w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-\u2013-SignalR-Serisi-8-\u2013-Clients-Turleri-ve-Kullanilan-Metotlar-\u2013-Caller-All-Others-1-160x160.jpg 160w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-\u2013-SignalR-Serisi-8-\u2013-Clients-Turleri-ve-Kullanilan-Metotlar-\u2013-Caller-All-Others-1-320x320.jpg 320w\" sizes=\"auto, (max-width: 150px) 100vw, 150px\" \/><\/a>\n<\/td>\n<td style=\"text-align:left;\">Server&#8217;a bildirim g\u00f6nderen client hari\u00e7 di\u011fer t\u00fcm client&#8217;lara bildirim g\u00f6nderir.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n    public class MyHub : Hub\r\n    {\r\n        public async Task SendOthersMessage(string message)\r\n        {\r\n            await Clients.Others.SendAsync(&quot;receiveMessage&quot;, message);\r\n        }\r\n    }\r\n<\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u0130lgili propertylerin davran\u0131\u015flar\u0131n\u0131 sergilemek i\u00e7in a\u015fa\u011f\u0131daki g\u00f6rselleri inceleyebilirsiniz&#8230;<\/p>\n<table>\n<thead>\n<tr>\n<th>Caller<\/th>\n<th>All<\/th>\n<th>Others<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-SignalR-Serisi-8-Clients-Turleri-ve-Kullanilan-Metotlar-Caller-All-Others.gif\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-SignalR-Serisi-8-Clients-Turleri-ve-Kullanilan-Metotlar-Caller-All-Others.gif\" alt=\"Asp.NET Core - SignalR Serisi #8 - Clients T\u00fcrleri ve Kullan\u0131lan Metotlar - Caller | All | Others\" width=\"300\" height=\"220\" class=\"aligncenter size-full wp-image-17876\" \/><\/a><\/td>\n<td><a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-SignalR-Serisi-8-Clients-Turleri-ve-Kullanilan-Metotlar-Caller-All-Others-1.gif\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-SignalR-Serisi-8-Clients-Turleri-ve-Kullanilan-Metotlar-Caller-All-Others-1.gif\" alt=\"Asp.NET Core - SignalR Serisi #8 - Clients T\u00fcrleri ve Kullan\u0131lan Metotlar - Caller | All | Others\" width=\"300\" height=\"220\" class=\"aligncenter size-full wp-image-17878\" \/><\/a><\/td>\n<td><a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-SignalR-Serisi-8-Clients-Turleri-ve-Kullanilan-Metotlar-Caller-All-Others-2.gif\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-SignalR-Serisi-8-Clients-Turleri-ve-Kullanilan-Metotlar-Caller-All-Others-2.gif\" alt=\"Asp.NET Core - SignalR Serisi #8 - Clients T\u00fcrleri ve Kullan\u0131lan Metotlar - Caller | All | Others\" width=\"300\" height=\"220\" class=\"aligncenter size-full wp-image-17879\" \/><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong style=\"color: #e83e8c;\">\u0130leti G\u00f6nderim Metodu(SendAsync)<\/strong><br \/>\n\u0130leti g\u00f6nderim metodu yukar\u0131daki Caller, All ve Others \u00f6zelliklerinden kullan\u0131lan\u0131n davran\u0131\u015flar\u0131na g\u00f6re \u015fekillenmekle birlikte sade ve sadece &#8216;SendAsync&#8217;den ibarettir.<\/p>\n<p>SendAsync a\u015fa\u011f\u0131daki varyasyonlar e\u015fli\u011finde kullan\u0131l\u0131r;<\/p>\n<ul>\n<li><code style=\"font-size:12px;\"><strong>await Clients.<span style=\"color:orange;\">Caller<\/span>.<span style=\"color:purple;\">SendAsync<\/span>(\"receiveMessage\", message);<\/strong><\/code><br \/>\nSadece ilgili Hub&#8217;a ileti g\u00f6nderene ileti g\u00f6nderir.<\/li>\n<li><code style=\"font-size:12px;\"><strong>await Clients.<span style=\"color:orange;\">All<\/span>.<span style=\"color:purple;\">SendAsync<\/span>(\"receiveMessage\", message);<\/strong><\/code><br \/>\nHub&#8217;a ba\u011fl\u0131 t\u00fcm client&#8217;lara ileti g\u00f6nderir.<\/li>\n<li><code style=\"font-size:12px;\"><strong>await Clients.<span style=\"color:orange;\">Others<\/span>.<span style=\"color:purple;\">SendAsync<\/span>(\"receiveMessage\", message);<\/strong><\/code><br \/>\nHub&#8217;a ileti g\u00f6nderen d\u0131\u015f\u0131ndaki t\u00fcm client&#8217;lara ileti g\u00f6nderir.<\/li>\n<\/ul>\n<p><strong style=\"color: #e83e8c;\">Hub Clients Metotlar\u0131<\/strong><br \/>\nHub \u00fczerinden etkile\u015fime ge\u00e7ilecek olan client&#8217;lar ile \u00f6zelle\u015ftirilmi\u015f davran\u0131\u015flar sergileyebilmek i\u00e7in kullan\u0131lan metotlard\u0131r.<\/p>\n<ul>\n<li><strong>AllExcept<\/strong><br \/>\n<a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-SignalR-Serisi-8-Clients-Turleri-ve-Kullanilan-Metotlar-Caller-All-Others-3.gif\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-SignalR-Serisi-8-Clients-Turleri-ve-Kullanilan-Metotlar-Caller-All-Others-3.gif\" alt=\"Asp.NET Core \u2013 SignalR Serisi #8 \u2013 Clients T\u00fcrleri ve Kullan\u0131lan Metotlar \u2013 Caller | All | Others\" width=\"250\" height=\"250\" class=\"alignleft size-full wp-image-17919\" \/><\/a><br \/>\nBelirtilen client&#8217;lar hari\u00e7 server&#8217;a ba\u011fl\u0131 t\u00fcm client&#8217;lara bildiride bulunur.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n    public class MyHub : Hub\r\n    {\r\n        public async Task AllExceptSendMessage(string&#x5B;] excludedClients, string message)\r\n        {\r\n            await Clients.AllExcept(excludedClients).SendAsync(&quot;receiveMessage&quot;, message);\r\n        }\r\n    }\r\n<\/pre>\n<\/li>\n<li><strong>Client<\/strong><br \/>\n<a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-SignalR-Serisi-8-Clients-Turleri-ve-Kullanilan-Metotlar-Caller-All-Others-4.gif\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-SignalR-Serisi-8-Clients-Turleri-ve-Kullanilan-Metotlar-Caller-All-Others-4.gif\" alt=\"Asp.NET Core \u2013 SignalR Serisi #8 \u2013 Clients T\u00fcrleri ve Kullan\u0131lan Metotlar \u2013 Caller | All | Others\" width=\"250\" height=\"250\" class=\"alignleft size-full wp-image-17934\" \/><\/a><br \/>\nServer&#8217;a ba\u011fl\u0131 olan client&#8217;lar aras\u0131ndan sadece belirli bir client&#8217;a bildiride bulunur.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n    public class MyHub : Hub\r\n    {\r\n        public async Task ClientSendMessage(string connectionId, string message)\r\n        {\r\n            await Clients.Client(connectionId).SendAsync(&quot;receiveMessage&quot;, message);\r\n        }\r\n    }\r\n<\/pre>\n<\/li>\n<li><strong>Clients<\/strong><br \/>\n<a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-SignalR-Serisi-8-Clients-Turleri-ve-Kullanilan-Metotlar-Caller-All-Others-5.gif\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-SignalR-Serisi-8-Clients-Turleri-ve-Kullanilan-Metotlar-Caller-All-Others-5.gif\" alt=\"Asp.NET Core \u2013 SignalR Serisi #8 \u2013 Clients T\u00fcrleri ve Kullan\u0131lan Metotlar \u2013 Caller | All | Others\" width=\"250\" height=\"250\" class=\"alignleft size-full wp-image-17936\" \/><\/a>Server&#8217;a ba\u011fl\u0131 olan client&#8217;lar aras\u0131ndan sadece belirtilenlere bildiride bulunur.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n    public class MyHub : Hub\r\n    {\r\n        public async Task ClientsSendMessage(string&#x5B;] clients, string message)\r\n        {\r\n            await Clients.Clients(clients).SendAsync(&quot;receiveMessage&quot;, message);\r\n        }\r\n    }\r\n<\/pre>\n<\/li>\n<li><strong>Group<\/strong><br \/>\n<a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-SignalR-Serisi-8-Clients-Turleri-ve-Kullanilan-Metotlar-Caller-All-Others-6.gif\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-SignalR-Serisi-8-Clients-Turleri-ve-Kullanilan-Metotlar-Caller-All-Others-6.gif\" alt=\"Asp.NET Core \u2013 SignalR Serisi #8 \u2013 Clients T\u00fcrleri ve Kullan\u0131lan Metotlar \u2013 Caller | All | Others\" width=\"250\" height=\"250\" class=\"alignleft size-full wp-image-17939\" \/><\/a>Belirtilen gruptaki t\u00fcm client&#8217;lara bildiride bulunur.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n    public class MyHub : Hub\r\n    {\r\n        public async Task AddToGroup(string groupName)\r\n        {\r\n            await Groups.AddToGroupAsync(Context.ConnectionId, groupName);\r\n        }\r\n        public async Task GroupSendMessage(string groupName, string message)\r\n        {\r\n            await Clients.Group(groupName).SendAsync(&quot;receiveMessage&quot;, message);\r\n        }\r\n    }\r\n<\/pre>\n<\/li>\n<li><strong>GroupExcept<\/strong><br \/>\n<a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-SignalR-Serisi-8-Clients-Turleri-ve-Kullanilan-Metotlar-Caller-All-Others-7.gif\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-SignalR-Serisi-8-Clients-Turleri-ve-Kullanilan-Metotlar-Caller-All-Others-7.gif\" alt=\"Asp.NET Core \u2013 SignalR Serisi #8 \u2013 Clients T\u00fcrleri ve Kullan\u0131lan Metotlar \u2013 Caller | All | Others\" width=\"250\" height=\"250\" class=\"alignleft size-full wp-image-17950\" \/><\/a>Belirtilen grupta, belirtilen client&#8217;lar d\u0131\u015f\u0131ndaki t\u00fcm client&#8217;lara bildiride bulunur.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n    public class MyHub : Hub\r\n    {\r\n        public async Task AddToGroup(string groupName)\r\n        {\r\n            await Groups.AddToGroupAsync(Context.ConnectionId, groupName);\r\n        }\r\n        public async Task GroupExceptSendMessage(string groupName, string&#x5B;] excludedClients, string message)\r\n        {\r\n            await Clients.GroupExcept(groupName, excludedClients).SendAsync(&quot;receiveMessage&quot;, message);\r\n        }\r\n    }\r\n<\/pre>\n<p><span style=\"color:purple;font-size:10px;\">Not: T\u00fcm metotlara dair UI ve Server olmak \u00fczere ikili \u00f6rneklendirmeleri makalenin en sonundaki \u00f6rnek proje(leri) indirerek inceleyebilirsiniz. Bunlardan en kapsaml\u0131s\u0131 GroupExcept i\u00e7in yap\u0131lan \u00f6rneklendirmedir. \u00d6zellikle incelemenizi tavsiye ederim.<\/span>\n<\/li>\n<li><strong>Groups<\/strong><br \/>\n<a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-SignalR-Serisi-8-Clients-Turleri-ve-Kullanilan-Metotlar-Caller-All-Others-8.gif\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-SignalR-Serisi-8-Clients-Turleri-ve-Kullanilan-Metotlar-Caller-All-Others-8.gif\" alt=\"Asp.NET Core \u2013 SignalR Serisi #8 \u2013 Clients T\u00fcrleri ve Kullan\u0131lan Metotlar \u2013 Caller | All | Others\" width=\"250\" height=\"250\" class=\"alignleft size-full wp-image-17954\" \/><\/a>Birden \u00e7ok gruptaki client&#8217;lara bildiride bulunur.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n    public class MyHub : Hub\r\n    {\r\n        public async Task GroupsSendMessage(string&#x5B;] groupNames, string message)\r\n        {\r\n            await Clients.Groups(groupNames).SendAsync(&quot;receiveMessage&quot;, message);\r\n        }\r\n        public async Task GetGroupsClients(string&#x5B;] groupsName)\r\n        {\r\n            List&lt;string&gt; datas = new List&lt;string&gt;();\r\n            foreach (var groupName in groupsName)\r\n            {\r\n                datas.AddRange(groupClients.Where(g =&gt; g.GroupName == groupName).Select(c =&gt; c.ConnectionId).ToList());\r\n            }\r\n            await Clients.Caller.SendAsync(&quot;getGroupClients&quot;, datas);\r\n        }\r\n    }\r\n<\/pre>\n<\/li>\n<li><strong>OthersInGroup<\/strong><br \/>\n<a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-SignalR-Serisi-8-Clients-Turleri-ve-Kullanilan-Metotlar-Caller-All-Others-9.gif\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/Asp.NET-Core-SignalR-Serisi-8-Clients-Turleri-ve-Kullanilan-Metotlar-Caller-All-Others-9.gif\" alt=\"Asp.NET Core \u2013 SignalR Serisi #8 \u2013 Clients T\u00fcrleri ve Kullan\u0131lan Metotlar \u2013 Caller | All | Others\" width=\"250\" height=\"250\" class=\"alignleft size-full wp-image-17956\" \/><\/a>Bildiride bulunan client haricinde gruptaki t\u00fcm client&#8217;lara bildiride bulunur.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n    public class MyHub : Hub\r\n    {\r\n        public async Task OthersInGroupSendMessage(string groupName, string message)\r\n        {\r\n            await Clients.OthersInGroup(groupName).SendAsync(&quot;receiveMessage&quot;, message);\r\n        }\r\n    }\r\n<\/pre>\n<\/li>\n<li><strong>User<\/strong><br \/>\nAuthentication olan kullan\u0131c\u0131yla ili\u015fkili t\u00fcm client&#8217;lara bildiride bulunur.\n<\/li>\n<li><strong>Users<\/strong><br \/>\nAuthentication olan kullan\u0131c\u0131larla ili\u015fkili t\u00fcm client&#8217;lara bildiride bulunur.\n<\/li>\n<\/ul>\n<p><span style=\"color:green;font-size:10px;\">&#8216;User&#8217; ve &#8216;Users&#8217; metotlar\u0131n\u0131 ileride SignalR ile Authentication ve Authorization konular\u0131n\u0131 ele al\u0131rken inceleyece\u011fiz.<\/span><\/p>\n<p>\u0130lgilenenlerin faydalanmas\u0131 dile\u011fiyle&#8230;<br \/>\nSonraki yaz\u0131lar\u0131m\u0131zda g\u00f6r\u00fc\u015fmek \u00fczere&#8230;<br \/>\n\u0130yi \u00e7al\u0131\u015fmalar&#8230;<\/p>\n<p>Not: \u00d6rnek projeleri indirmek i\u00e7in a\u015fa\u011f\u0131daki linklere t\u0131klay\u0131n\u0131z.<\/p>\n<ul>\n<li><a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/SignalRAllExceptExampleUI.zip\">(Client)SignalRAllExceptExampleUI<\/a><\/li>\n<li><a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/SignalRClientExampleUI.zip\">(Client)SignalRClientExampleUI<\/a><\/li>\n<li><a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/SignalRClientsExampleUI.zip\">(Client)SignalRClientsExampleUI<\/a><\/li>\n<li><a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/SignalRExampleUI-3.zip\">(Client)SignalRExampleUI<\/a><\/li>\n<li><a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/SignalRGroupExampleUI.zip\">(Client)SignalRGroupExampleUI<\/a><\/li>\n<li><a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/SignalRGroupExceptExampleUI.zip\">(Client)SignalRGroupExceptExampleUI<\/a><\/li>\n<li><a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/SignalRGroupsExampleUI.zip\">(Client)SignalRGroupsExampleUI<\/a><\/li>\n<li><a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/SignalROthersInGroupExampleUI.zip\">(Client)SignalROthersInGroupExampleUI<\/a><\/li>\n<li><a href=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2020\/09\/SignalRClientTypes.zip\">(Server)SignalRClientTypes<\/a><\/li>\n<\/ul>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Merhaba, SignalR Hub s\u0131n\u0131flar\u0131, client ile server aras\u0131nda e\u015fzamanl\u0131 etkile\u015fimi kurabilmek ve server&#8217;a ba\u011fl\u0131 olan client&#8217;lar aras\u0131nda iste\u011fe \u00f6zel farkl\u0131 davran\u0131\u015flar sergileyebilmek i\u00e7in Caller, All ve Others \u00f6zelliklerini i\u00e7ermektedir. Bu i\u00e7eri\u011fimizde, bu \u00f6zelliklerin davran\u0131\u015flar\u0131n\u0131&#46;&#46;&#46;<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":17653,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3760],"tags":[1977,639,3800,3804,3801,3771,3803,3805,3806,3807,3802,3808,3809,3810],"class_list":["post-17866","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-signalr","tag-sendmessage","tag-signalr","tag-signalr-all","tag-signalr-allexcept","tag-signalr-caller","tag-signalr-client","tag-signalr-clients","tag-signalr-group","tag-signalr-groupexcept","tag-signalr-groups","tag-signalr-others","tag-signalr-othersingroup","tag-signalr-user","tag-signalr-users"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts\/17866","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/comments?post=17866"}],"version-history":[{"count":81,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts\/17866\/revisions"}],"predecessor-version":[{"id":17970,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts\/17866\/revisions\/17970"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/media\/17653"}],"wp:attachment":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/media?parent=17866"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/categories?post=17866"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/tags?post=17866"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}