{"id":22906,"date":"2020-01-08T23:12:08","date_gmt":"2020-01-08T14:12:08","guid":{"rendered":"https:\/\/agrimo.jp\/wp\/?page_id=22906"},"modified":"2020-01-18T08:04:03","modified_gmt":"2020-01-17T23:04:03","slug":"%ef%bc%92%ef%bc%8ewebsocket-api-2","status":"publish","type":"page","link":"https:\/\/agrimo.jp\/wp\/?page_id=22906","title":{"rendered":"\uff15\uff0eWebSocket API\uff08Xamarin.Forms\uff09"},"content":{"rendered":"<p><strong>\u2605\u3054\u6ce8\u610f<\/strong><\/p>\n<p style=\"padding-left: 40px;\">\u4ee5\u4e0b\u306f\u3001Microsoft Visual Studio Community 2019 \u306e Xamarin.Forms \u3092\u4f7f\u7528\u3057\u3066\u3001Android\u30fbiOS\u30fbUWP\u5411\u3051\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30a2\u30d7\u30ea\u3092\u958b\u767a\u3059\u308b\u5834\u5408\u3092\u60f3\u5b9a\u3057\u305f WebSocket API \u306e\u3054\u8aac\u660e\u3068\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u5149CTI\u30b9\u30de\u30fc\u30c8\u30b3\u30cd\u30af\u30c8\u30b5\u30fc\u30d3\u30b9\u306f\u3001WebSocket API\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002<\/p>\n<p style=\"padding-left: 40px;\"><span style=\"color: #ff0000;\">\u203bWindows 7SP1 \u3067\u306f\u52d5\u4f5c\u3057\u307e\u305b\u3093\u3002WebSocket API \u3092\u3054\u5229\u7528\u306e\u969b\u306f\u3001<\/span><span style=\"color: #ff0000;\"> Windows 8\u30018.1\u300110 \u3092\u3054\u4f7f\u7528\u304f\u3060\u3055\u3044\u3002<br \/>\n\uff08Windows 7SP1 \u306f OS\u30ec\u30d9\u30eb\u306e WebSocket\u306b\u975e\u5bfe\u5fdc\u306e\u305f\u3081\u3001<\/span><span style=\"color: #ff0000;\">\u3054\u5229\u7528\u3044\u305f\u3060\u3051\u307e\u305b\u3093\u3002\uff09<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>\u3010\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u5229\u7528\u65b9\u6cd5\u3011<\/p>\n<ol>\n<li>\u30b5\u30fc\u30d0\u30fc\u306b\u3059\u308b\u30d1\u30bd\u30b3\u30f3\u306b\u300c\u5149CTI\u30b9\u30de\u30fc\u30c8\u30b3\u30cd\u30af\u30c8\u30b5\u30fc\u30d3\u30b9\u300d\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/li>\n<li>Microsoft Visual Studio Community 2019 \u3067 Xamarin.Forms\u306e\u65b0\u898f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/li>\n<li><a href=\"https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/2020-01-08_23h48_38.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-22940\" src=\"https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/2020-01-08_23h48_38-300x208.png\" alt=\"\" width=\"300\" height=\"208\" srcset=\"https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/2020-01-08_23h48_38-300x208.png 300w, https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/2020-01-08_23h48_38-50x35.png 50w, https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/2020-01-08_23h48_38-820x569.png 820w, https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/2020-01-08_23h48_38.png 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/li>\n<li>NuGet\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u3067\u300cSystem.Net.Websockets\u300d\u3092\u5168\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/li>\n<li><a href=\"https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/2020-01-09_00h04_35.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-22949\" src=\"https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/2020-01-09_00h04_35-300x159.png\" alt=\"\" width=\"300\" height=\"159\" srcset=\"https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/2020-01-09_00h04_35-300x159.png 300w, https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/2020-01-09_00h04_35-1024x544.png 1024w, https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/2020-01-09_00h04_35-50x27.png 50w, https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/2020-01-09_00h04_35-820x436.png 820w, https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/2020-01-09_00h04_35.png 1364w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/li>\n<li>NuGet\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u3067 Xamarin.Forms \u4ed6\u3092\u6700\u65b0\u306e\u72b6\u614b\u306b\u66f4\u65b0\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/li>\n<li><a href=\"https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/2020-01-18_07h58_33.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-22997\" src=\"https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/2020-01-18_07h58_33-300x160.png\" alt=\"\" width=\"300\" height=\"160\" srcset=\"https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/2020-01-18_07h58_33-300x160.png 300w, https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/2020-01-18_07h58_33-1024x546.png 1024w, https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/2020-01-18_07h58_33-50x27.png 50w, https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/2020-01-18_07h58_33-820x437.png 820w, https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/2020-01-18_07h58_33.png 1366w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/li>\n<li>UWP\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u5834\u5408\u306f\u3001\u6a5f\u80fd\u306e\u300c\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\uff08\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\uff09\u300d\u3068\u300c\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\uff08\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3068\u30b5\u30fc\u30d0\u30fc\uff09\u300d\u306b\u30c1\u30a7\u30c3\u30af\u3092\u4ed8\u3051\u307e\u3059\u3002<\/li>\n<li><a href=\"https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/2020-01-17_07h54_06.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-22964\" src=\"https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/2020-01-17_07h54_06-300x160.png\" alt=\"\" width=\"300\" height=\"160\" srcset=\"https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/2020-01-17_07h54_06-300x160.png 300w, https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/2020-01-17_07h54_06-1024x547.png 1024w, https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/2020-01-17_07h54_06-50x27.png 50w, https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/2020-01-17_07h54_06-820x438.png 820w, https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/2020-01-17_07h54_06.png 1364w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/li>\n<li>\u4ee5\u4e0b\u306e\u3010\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\uff08Xamarin.Forms\u7528\uff09\u306e\u30b5\u30f3\u30d7\u30eb\u30bd\u30fc\u30b9\u2460\u3000MainPage.xaml\u3011\u3092\u53c2\u8003\u306b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/li>\n<li>\u4ee5\u4e0b\u306e\u3010\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\uff08Xamarin.Forms\u7528\uff09\u306e\u30b5\u30f3\u30d7\u30eb\u30bd\u30fc\u30b9\u2461\u3000MainPage.xaml.cs\u3011\u3092\u53c2\u8003\u306b\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/li>\n<li>\u4f5c\u6210\u3057\u305f\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\uff08Xamarin.Forms\u7528\uff09\u3092\u30d3\u30eb\u30c9\u5f8c\u3001\u5b9f\u6a5f\uff08Android\u30fbiOS\u30fbUWP\uff09\u4e0a\u3067\u5b9f\u884c\u3057\u307e\u3059\u3002<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>\u3010\u4f7f\u7528\u3059\u308b\u30dd\u30fc\u30c8\u3011<\/p>\n<ul>\n<li>55963\u30dd\u30fc\u30c8\uff08\u30b5\u30fc\u30d3\u30b9\u5074\u306e\u30d1\u30bd\u30b3\u30f3\u3067\u30aa\u30fc\u30d7\u30f3\u304c\u5fc5\u8981\u3067\u3059\u3002\uff09<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>\u3010\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\uff08Xamarin.Forms\u7528\uff09\u306e\u30b5\u30f3\u30d7\u30eb\u30bd\u30fc\u30b9\u2460\u3000MainPage.xaml\u3011<\/p>\n<pre class=\"lang:default decode:true \" title=\"MainPage.xaml\">&lt;?xml version=\"1.0\" encoding=\"utf-8\" ?&gt;\r\n&lt;ContentPage xmlns=\"http:\/\/xamarin.com\/schemas\/2014\/forms\"\r\n             xmlns:x=\"http:\/\/schemas.microsoft.com\/winfx\/2009\/xaml\"\r\n             xmlns:d=\"http:\/\/xamarin.com\/schemas\/2014\/forms\/design\"\r\n             xmlns:mc=\"http:\/\/schemas.openxmlformats.org\/markup-compatibility\/2006\"\r\n             mc:Ignorable=\"d\"\r\n             x:Class=\"ClientWebSocketSample.MainPage\"&gt;\r\n\r\n    &lt;StackLayout&gt;\r\n        &lt;!-- Place new controls here --&gt;\r\n        &lt;Label Text=\"Xamarin.Forms WebSocket\u30b5\u30f3\u30d7\u30eb\" \r\n           HorizontalOptions=\"Center\"\r\n           VerticalOptions=\"CenterAndExpand\" \/&gt;\r\n        &lt;Button Text=\"\u30b5\u30fc\u30d3\u30b9\u3078\u63a5\u7d9a\" x:Name=\"\u30b5\u30fc\u30d3\u30b9\u3078\u63a5\u7d9a\" Clicked=\"\u30b5\u30fc\u30d3\u30b9\u3078\u63a5\u7d9a_Clicked\" \/&gt;\r\n        &lt;Button Text=\"\u30b5\u30fc\u30d3\u30b9\u304b\u3089\u5207\u65ad\" x:Name=\"\u30b5\u30fc\u30d3\u30b9\u304b\u3089\u5207\u65ad\" Clicked=\"\u30b5\u30fc\u30d3\u30b9\u304b\u3089\u5207\u65ad_Clicked\" \/&gt;\r\n    &lt;\/StackLayout&gt;\r\n\r\n&lt;\/ContentPage&gt;<\/pre>\n<p>&nbsp;<\/p>\n<p>\u3010\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30d7\u30ed\u30b0\u30e9\u30e0\uff08Xamarin.Forms\u7528\uff09\u306e\u30b5\u30f3\u30d7\u30eb\u30bd\u30fc\u30b9\u2461\u3000MainPage.xaml.cs\u3011<\/p>\n<pre class=\"lang:default decode:true \" title=\"MainPage.xaml.cs\">using System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\nusing Xamarin.Forms;\r\nusing System.Net.WebSockets;\r\nusing System.Threading;\r\n\r\nnamespace ClientWebSocketSample\r\n{\r\n    \/\/ Learn more about making custom code visible in the Xamarin.Forms previewer\r\n    \/\/ by visiting https:\/\/aka.ms\/xamarinforms-previewer\r\n    [DesignTimeVisible(false)]\r\n    public partial class MainPage : ContentPage\r\n    {\r\n        private ClientWebSocket _ws = null;\r\n\r\n        public MainPage()\r\n        {\r\n            InitializeComponent();\r\n        }\r\n\r\n        \/\/\u5149CTI\u30b9\u30de\u30fc\u30c8\u30b3\u30cd\u30af\u30c8\u30b5\u30fc\u30d3\u30b9\u3078\u63a5\u7d9a\r\n        private async void \u30b5\u30fc\u30d3\u30b9\u3078\u63a5\u7d9a_Clicked(object sender, EventArgs e)\r\n        {\r\n            try\r\n            {\r\n                int _cnt = 1;\r\n\r\n                _ws = new ClientWebSocket();\r\n\r\n                \/\/\u63a5\u7d9a\u5148\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u6307\u5b9a\uff08\u5149CTI\u30b9\u30de\u30fc\u30c8\u30b3\u30cd\u30af\u30c8\u30b5\u30fc\u30d3\u30b9\u7a3c\u50cd\u4e2dPC\u306eIP\u30a2\u30c9\u30ec\u30b9\u3067\u6307\u5b9a\u3059\u308b\uff09\r\n                Uri serverUri = new Uri(\"ws:\/\/192.168.24.36:55963\/CTI_SmartConnectService\/WebSocket\/\");\r\n\r\n                \/\/\u30ad\u30fc\u30d7\u30a2\u30e9\u30a4\u30d6\u30bf\u30a4\u30de\u30fc\u306e\u9593\u9694\u3092\uff15\u5206\u306b\u8a2d\u5b9a\r\n                _ws.Options.KeepAliveInterval = TimeSpan.FromSeconds(5 * 60 * 1000);\r\n\r\n                \/\/\u30b5\u30fc\u30d3\u30b9\u306b\u63a5\u7d9a\r\n                await _ws.ConnectAsync(serverUri, CancellationToken.None);\r\n                while (_ws.State == WebSocketState.Open)\r\n                {\r\n                    if (_cnt == 1)   \/\/\uff11\u56de\u3060\u3051\u5b9f\u884c\r\n                    {\r\n                        _cnt++;\r\n\r\n                        \/\/\u30b5\u30fc\u30d3\u30b9\u3078\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u4fe1\r\n                        string sendmsg = \"Regist('\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u540d')\";\r\n                        ArraySegment&lt;byte&gt; bytesToSend = new ArraySegment&lt;byte&gt;(Encoding.UTF8.GetBytes(sendmsg));\r\n                        await _ws.SendAsync(bytesToSend, WebSocketMessageType.Text, true, CancellationToken.None);\r\n                    }\r\n\r\n                    \/\/\u30b5\u30fc\u30d3\u30b9\u304b\u3089\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d7\u4fe1\r\n                    ArraySegment&lt;byte&gt; bytesReceived = new ArraySegment&lt;byte&gt;(new byte[1024]);\r\n                    WebSocketReceiveResult result = await _ws.ReceiveAsync(bytesReceived, CancellationToken.None);\r\n                    string recvmsg = Encoding.UTF8.GetString(bytesReceived.Array, 0, result.Count);\r\n                    if (string.IsNullOrEmpty(recvmsg) == false)\r\n                    {\r\n                        await DisplayAlert(\"\u30b5\u30fc\u30d3\u30b9\u304b\u3089\u306e\u901a\u77e5\", recvmsg, \"OK\");\r\n                    }\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                await DisplayAlert(\"\u30a8\u30e9\u30fc\", ex.Message, \"OK\");\r\n            }\r\n        }\r\n\r\n        \/\/\u5149CTI\u30b9\u30de\u30fc\u30c8\u30b3\u30cd\u30af\u30c8\u30b5\u30fc\u30d3\u30b9\u304b\u3089\u5207\u65ad\r\n        private async void \u30b5\u30fc\u30d3\u30b9\u304b\u3089\u5207\u65ad_Clicked(object sender, EventArgs e)\r\n        {\r\n            try\r\n            {\r\n                if (_ws != null &amp;&amp; _ws.State == WebSocketState.Open)\r\n                {\r\n                    \/\/\u30b5\u30fc\u30d3\u30b9\u3078\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u4fe1\r\n                    string sendmsg = \"UnRegist('\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u540d')\";\r\n                    ArraySegment&lt;byte&gt; bytesToSend = new ArraySegment&lt;byte&gt;(Encoding.UTF8.GetBytes(sendmsg));\r\n                    await _ws.SendAsync(bytesToSend, WebSocketMessageType.Text, true, CancellationToken.None);\r\n\r\n                    await DisplayAlert(\"\u78ba\u8a8d\", \"\u5149CTI\u30b9\u30de\u30fc\u30c8\u30b3\u30cd\u30af\u30c8\u30b5\u30fc\u30d3\u30b9\u304b\u3089\u5207\u65ad\u3057\u307e\u3057\u305f\u3002\", \"OK\");\r\n                }\r\n            }\r\n            catch (Exception ex)\r\n            {\r\n                await DisplayAlert(\"\u30a8\u30e9\u30fc\", ex.Message, \"OK\");\r\n            }\r\n        }\r\n    }\r\n}\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\u3010\u5b9f\u884c\u753b\u9762\u30b5\u30f3\u30d7\u30eb\u3011<\/p>\n<p style=\"padding-left: 40px;\"><a href=\"https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/Screenshot_2020-01-08-23-24-03.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-22928\" src=\"https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/Screenshot_2020-01-08-23-24-03-169x300.png\" alt=\"\" width=\"169\" height=\"300\" srcset=\"https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/Screenshot_2020-01-08-23-24-03-169x300.png 169w, https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/Screenshot_2020-01-08-23-24-03-576x1024.png 576w, https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/Screenshot_2020-01-08-23-24-03-28x50.png 28w, https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/Screenshot_2020-01-08-23-24-03.png 720w\" sizes=\"auto, (max-width: 169px) 100vw, 169px\" \/><\/a> <a href=\"https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/Screenshot_2020-01-08-23-24-10.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-22929\" src=\"https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/Screenshot_2020-01-08-23-24-10-169x300.png\" alt=\"\" width=\"169\" height=\"300\" srcset=\"https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/Screenshot_2020-01-08-23-24-10-169x300.png 169w, https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/Screenshot_2020-01-08-23-24-10-576x1024.png 576w, https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/Screenshot_2020-01-08-23-24-10-28x50.png 28w, https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/Screenshot_2020-01-08-23-24-10.png 720w\" sizes=\"auto, (max-width: 169px) 100vw, 169px\" \/><\/a> <a href=\"https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/Screenshot_2020-01-08-23-24-56.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-22930\" src=\"https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/Screenshot_2020-01-08-23-24-56-169x300.png\" alt=\"\" width=\"169\" height=\"300\" srcset=\"https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/Screenshot_2020-01-08-23-24-56-169x300.png 169w, https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/Screenshot_2020-01-08-23-24-56-576x1024.png 576w, https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/Screenshot_2020-01-08-23-24-56-28x50.png 28w, https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/Screenshot_2020-01-08-23-24-56.png 720w\" sizes=\"auto, (max-width: 169px) 100vw, 169px\" \/><\/a> <a href=\"https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/Screenshot_2020-01-08-23-25-01.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-22931\" src=\"https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/Screenshot_2020-01-08-23-25-01-169x300.png\" alt=\"\" width=\"169\" height=\"300\" srcset=\"https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/Screenshot_2020-01-08-23-25-01-169x300.png 169w, https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/Screenshot_2020-01-08-23-25-01-576x1024.png 576w, https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/Screenshot_2020-01-08-23-25-01-28x50.png 28w, https:\/\/agrimo.jp\/wp\/wp-content\/uploads\/2020\/01\/Screenshot_2020-01-08-23-25-01.png 720w\" sizes=\"auto, (max-width: 169px) 100vw, 169px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\u3010\u5149CTI\u30b9\u30de\u30fc\u30c8\u30b3\u30cd\u30af\u30c8\u30b5\u30fc\u30d3\u30b9WebSocket API\u4ed5\u69d8\u3011<\/p>\n<table style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr>\n<th style=\"width: 15%;\" scope=\"col\">\u30a2\u30c9\u30ec\u30b9<\/th>\n<td style=\"width: 85%;\">ws:\/\/\uff08\u30b5\u30fc\u30d3\u30b9\u5b9f\u884c\u4e2d\u306e\u30d1\u30bd\u30b3\u30f3\u306eIP\u30a2\u30c9\u30ec\u30b9\uff09:55963\/CTI_SmartConnectService\/WebSocket\/<\/td>\n<\/tr>\n<tr>\n<th style=\"width: 15%;\" scope=\"col\">\u30d0\u30a4\u30f3\u30c7\u30a3\u30f3\u30b0<\/th>\n<td style=\"width: 85%;\">\n<div>\n<div>customBinding\uff08n<span style=\"font-family: inherit; font-size: inherit;\">etHttpBinding \u304b\u3089\u306e\u6d3e\u751f\uff09<\/span><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table style=\"border-collapse: collapse; width: 100%; height: 239px;\">\n<thead>\n<tr style=\"height: 24px;\">\n<th style=\"width: 30%; height: 24px;\" scope=\"row\">\u30c7\u30fc\u30bf\u540d\u79f0<\/th>\n<th style=\"width: 70%; height: 24px;\" colspan=\"2\" scope=\"row\">Send \u30e1\u30c3\u30bb\u30fc\u30b8<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 24px;\">\n<td style=\"height: 24px; width: 30%;\" rowspan=\"2\">\u63a5\u7d9a\u4e2d\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30ea\u30b9\u30c8\u3078\u767b\u9332\u3059\u308b<\/td>\n<td style=\"height: 24px; width: 70%;\" colspan=\"2\"><strong>Regist(&#8216;name&#8217;)<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 70%;\" colspan=\"2\">\n<ul>\n<li>name = \u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u540d\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"height: 24px; width: 30%;\" rowspan=\"2\">\u63a5\u7d9a\u4e2d\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30ea\u30b9\u30c8\u304b\u3089\u767b\u9332\u89e3\u9664\u3059\u308b<\/td>\n<td style=\"height: 24px; width: 70%;\" colspan=\"2\"><strong>UnRegist(&#8216;name&#8217;)<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 70%;\" colspan=\"2\">\n<ul>\n<li>name = \u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u540d\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr style=\"height: 23px;\">\n<td style=\"height: 23px; width: 30%;\" rowspan=\"2\">\u30ad\u30fc\u30d7\u30a2\u30e9\u30a4\u30d6\uff08\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u3092\u9632\u3050\u305f\u3081\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u30895\u5206\u9593\u9694\u3067\u547c\u3073\u51fa\u3059\uff09<\/p>\n<p><span style=\"color: #ff0000;\">\u203b\u8abf\u67fb\u306e\u7d50\u679c\u3001\u672c\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u9001\u4fe1\u3057\u306a\u304f\u3066\u3082\u63a5\u7d9a\u304c\u30ad\u30fc\u30d7\u3055\u308c\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u3002<\/span><\/td>\n<td style=\"height: 23px; width: 70%;\" colspan=\"2\"><strong>KeepAlive(&#8216;name&#8217;)<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 70%;\" colspan=\"2\">WCF\u306e\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u3092\u9632\u3050\u305f\u3081\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089\u5b9a\u671f\u7684\u306b\u30ad\u30fc\u30d7\u30a2\u30e9\u30a4\u30d6\u3092\u30b3\u30fc\u30eb\u3057\u307e\u3059\u3002\uff0810\u5206\u4ee5\u5185\u306b1\u56de\u30b3\u30fc\u30eb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\uff09<\/p>\n<ul>\n<li>name = \u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u540d\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table style=\"border-collapse: collapse; width: 100%; height: 167px;\">\n<thead>\n<tr style=\"height: 24px;\">\n<th style=\"width: 30%; height: 24px;\" scope=\"row\">\u30c7\u30fc\u30bf\u540d\u79f0<\/th>\n<th style=\"width: 70%; height: 24px;\" colspan=\"2\" scope=\"row\">CallBack \u30e1\u30c3\u30bb\u30fc\u30b8<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 24px;\">\n<td style=\"height: 48px; width: 30%;\" rowspan=\"2\">\u30b5\u30fc\u30d3\u30b9\u304b\u3089\u306e\u901a\u77e5<\/td>\n<td style=\"height: 24px;\" colspan=\"2\"><strong>{<br \/>\n&#8220;title&#8221;:&#8221;\u30bf\u30a4\u30c8\u30eb&#8221;,<br \/>\n&#8220;msg&#8221;:&#8221;\u30e1\u30c3\u30bb\u30fc\u30b8&#8221;,<br \/>\n&#8220;tyakusin_nichiji&#8221;:&#8221;\u7740\u4fe1\u65e5\u6642&#8221;,<br \/>\n&#8220;from&#8221;:&#8221;\u76f8\u624bTEL&#8221;,<br \/>\n&#8220;to&#8221;:&#8221;\u7740\u4fe1TEL&#8221;,<br \/>\n&#8220;kokyaku_id&#8221;:&#8221;\u9867\u5ba2ID&#8221;,<br \/>\n&#8220;kokyaku_name&#8221;:&#8221;\u9867\u5ba2\u540d\uff08\u4f1a\u793e\u540d\uff09&#8221;,<br \/>\n&#8220;tantou_name&#8221;:&#8221;\u62c5\u5f53\u8005\u540d&#8221;,<br \/>\n&#8220;syubetsu&#8221;:&#8221;\u56de\u7dda\u7a2e\u5225&#8221;<br \/>\n}<br \/>\n<\/strong><\/p>\n<p style=\"padding-left: 40px;\"><strong>\u203bJSON\u5f62\u5f0f<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 70%;\" colspan=\"2\">\u30b5\u30fc\u30d3\u30b9\u304b\u3089\u7740\u4fe1\u30e1\u30c3\u30bb\u30fc\u30b8\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u751f\u5b58\u78ba\u8a8d\u3001\u51e6\u7406\u5b8c\u4e86\u901a\u77e5\u304c\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u3055\u308c\u307e\u3059\u3002<\/p>\n<ul>\n<li>title\u3000 = \u30e1\u30c3\u30bb\u30fc\u30b8\u30bf\u30a4\u30c8\u30eb\u304c\u30bb\u30c3\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/li>\n<li>msg = \u30e1\u30c3\u30bb\u30fc\u30b8\u672c\u6587\u304c\u30bb\u30c3\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/li>\n<li>tyakusin_nichiji = \u7740\u4fe1\u65e5\u6642\u304c\u30bb\u30c3\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/li>\n<li>from = \u76f8\u624bTEL\u304c\u30bb\u30c3\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/li>\n<li>to = \u7740\u4fe1TEL\u304c\u30bb\u30c3\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/li>\n<li>kokyaku_id = \u9867\u5ba2ID\u304c\u30bb\u30c3\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/li>\n<li>kokyaku_name = \u9867\u5ba2\u540d\uff08\u4f1a\u793e\u540d\uff09\u304c\u30bb\u30c3\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/li>\n<li>tantou_name = \u62c5\u5f53\u8005\u540d\u304c\u30bb\u30c3\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/li>\n<li>syubetsu = \u56de\u7dda\u7a2e\u5225\u304c\u30bb\u30c3\u30c8\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>\u2605\u3054\u6ce8\u610f \u4ee5\u4e0b\u306f\u3001Microsoft Visual Studio Community 2019 \u306e Xamar [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-22906","page","type-page","status-publish","hentry"],"wppr_data":{"cwp_meta_box_check":"No"},"_links":{"self":[{"href":"https:\/\/agrimo.jp\/wp\/index.php?rest_route=\/wp\/v2\/pages\/22906","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/agrimo.jp\/wp\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/agrimo.jp\/wp\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/agrimo.jp\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/agrimo.jp\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=22906"}],"version-history":[{"count":39,"href":"https:\/\/agrimo.jp\/wp\/index.php?rest_route=\/wp\/v2\/pages\/22906\/revisions"}],"predecessor-version":[{"id":23000,"href":"https:\/\/agrimo.jp\/wp\/index.php?rest_route=\/wp\/v2\/pages\/22906\/revisions\/23000"}],"wp:attachment":[{"href":"https:\/\/agrimo.jp\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=22906"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}