New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enabling OPC UA over WebSockets (again) #1836
Draft
maxschiffer
wants to merge
6
commits into
OPCFoundation:master
Choose a base branch
from
maxschiffer:feature/websockets
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
f706836
Added Websockets Binding
993f278
enabled tests for opc.wss
4163418
enabling opc.wss sign and encrypt endpoints in the tests
7e835b6
minor refactoring
1775a15
minor refactoring
7de6922
replaced EOL AspNetCore.Server.Kestrel version with AspNetCore.Http
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
60 changes: 60 additions & 0 deletions
60
Stack/Opc.Ua.Bindings.WebSockets/Opc.Ua.Bindings.WebSockets.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks>$(LibTargetFrameworks)</TargetFrameworks> | ||
<AssemblyName>Opc.Ua.Bindings.WebSockets</AssemblyName> | ||
<PackageId>OPCFoundation.NetStandard.Opc.Ua.Bindings.WebSockets</PackageId> | ||
<RootNamespace>Opc.Ua.Bindings</RootNamespace> | ||
<Description>OPC UA WebSockets Binding Library</Description> | ||
<IsPackable>true</IsPackable> | ||
<GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> | ||
<LangVersion>8.0</LangVersion> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)' == 'Debug'"> | ||
<PackageId>$(PackageId).Debug</PackageId> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(SignAssembly)' == 'true'"> | ||
<DefineConstants>$(DefineConstants);SIGNASSEMBLY</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net462|AnyCPU'"> | ||
<OutputPath>C:\Repositories\AC-LIC-Prototype - Sequencing - WebSockets\AC.LIC.Sequencing\bin\Debug\net5.0\</OutputPath> | ||
</PropertyGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' == 'net462'"> | ||
<Reference Include="System.Net.Http" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="2.1.3" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel.Core" Version="2.1.25" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets" Version="2.1.3" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel.Https" Version="2.1.3" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'"> | ||
<PackageReference Include="System.Net.Http" Version="4.3.4" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'"> | ||
<PackageReference Include="System.Net.Http" Version="4.3.4" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Opc.Ua.Core\Opc.Ua.Core.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Folder Include="Properties\" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Reference Include="System.IdentityModel" /> | ||
</ItemGroup> | ||
|
||
<Target Name="GetPackagingOutputs" /> | ||
|
||
</Project> |
24 changes: 24 additions & 0 deletions
24
Stack/Opc.Ua.Bindings.WebSockets/Properties/AssemblyInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* Copyright (c) 1996-2020 The OPC Foundation. All rights reserved. | ||
The source code in this file is covered under a dual-license scenario: | ||
- RCL: for OPC Foundation members in good-standing | ||
- GPL V2: everybody else | ||
RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ | ||
GNU General Public License as published by the Free Software Foundation; | ||
version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 | ||
This source code is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
*/ | ||
using System.Runtime.CompilerServices; | ||
|
||
#if SIGNASSEMBLY | ||
[assembly: InternalsVisibleTo("Opc.Ua.Core.Tests, PublicKey = " + | ||
// OPC Foundation Strong Name Public Key | ||
"0024000004800000940000000602000000240000525341310004000001000100d987b12f068b35" + | ||
"80429f3dde01397508880fc7e62621397618456ca1549aeacfbdb90c62adfe918f05ce3677b390" + | ||
"f78357b8745cb6e1334655afce1a9527ac92fc829ff585ea79f007e52ba0f83ead627e3edda40b" + | ||
"ec5ae574128fc9342cb57cb8285aa4e5b589c0ebef3be571b5c8f2ab1067f7c880e8f8882a73c8" + | ||
"0a12a1ef")] | ||
#else | ||
[assembly: InternalsVisibleTo("Opc.Ua.Core.Tests")] | ||
#endif |
46 changes: 46 additions & 0 deletions
46
Stack/Opc.Ua.Bindings.WebSockets/Stack/WebSockets/SendRequestAsyncResult.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* Copyright (c) 1996-2016, OPC Foundation. All rights reserved. | ||
|
||
The source code in this file is covered under a dual-license scenario: | ||
- RCL: for OPC Foundation members in good-standing | ||
- GPL V2: everybody else | ||
|
||
RCL license terms accompanied with this source code. See http://opcfoundation.org/License/RCL/1.00/ | ||
|
||
GNU General Public License as published by the Free Software Foundation; | ||
version 2 of the License are accompanied with this source code. See http://opcfoundation.org/License/GPLv2 | ||
|
||
This source code is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
*/ | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Net.Sockets; | ||
using System.Net.Security; | ||
using System.Text; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using System.IO; | ||
using System.Net; | ||
using System.Security.Cryptography; | ||
|
||
namespace Opc.Ua.Bindings | ||
{ | ||
internal class SendRequestAsyncResult : AsyncResultBase | ||
{ | ||
public uint RequestId; | ||
public WebSocketConnection Connection; | ||
public IServiceRequest Request; | ||
public IServiceResponse Response; | ||
public Task WorkItem; | ||
public new CancellationToken CancellationToken; | ||
|
||
public SendRequestAsyncResult(AsyncCallback callback, object callbackData, int timeout) | ||
: | ||
base(callback, callbackData, timeout) | ||
{ | ||
CancellationToken = new CancellationToken(); | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this kestrel version is end of life -- check the https project how to use latest kestrel...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. I just remove all Microsoft.AspNetCore.Server.Kestrel dependecies and add the new Microsoft.AspNetCore.Http dependency.
No code changes were required at all, the test results remain unchanged (when execting each test on its own):