-
Notifications
You must be signed in to change notification settings - Fork 948
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
base: master
Are you sure you want to change the base?
Conversation
This pull request introduces 36 alerts when merging 1775a15 into 8cc18b3 - view on LGTM.com new alerts:
|
thanks for driving this .. I see a lot of duplications of crypto code in the wss lib, please try to recycle core functions... |
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="2.1.3" /> |
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.
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
No code changes were required at all, the test results remain unchanged (when execting each test on its own):
This pull request introduces 36 alerts when merging 7de6922 into e3ac2bf - view on LGTM.com new alerts:
|
Hi @maxschiffer , please check out this implementation for websocket: https://github.com/Azure/Industrial-IoT/tree/main/components/opc-ua/src/Microsoft.Azure.IIoT.OpcUa.Protocol/src/Transport/Http There is a hook you can use with IMessageSocket, it may be a implementation that requires less duplicate code. |
Codecov Report
@@ Coverage Diff @@
## master #1836 +/- ##
==========================================
+ Coverage 54.61% 55.65% +1.03%
==========================================
Files 319 319
Lines 58669 58788 +119
==========================================
+ Hits 32045 32716 +671
+ Misses 26624 26072 -552
Continue to review full report at Codecov.
|
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.
please update the pull request if there is still interest.
Proposed changes
Hello all,
some time ago there was an effort to implement the WebSockets transport in the UA.NetStandard SDK and the branch demo/webapi was created.
Since the architecture has changed since then (transport bindings have been moved to a different project) and it could not be moved to the main branch without any additional work.
I've taken the code from the demo/webapi branch and have migrated it into a new project Opc.Ua.Bindings.WebSockets.
Additionaly I've updated the asymmetric/symmetric security implementations, since in the prototypical only parts were implemented.
Since I did not feel comfortable to write this on my own, I've just taken the existing implementation directly from the opc.tcp channel implementation in the core project.
Besides that I've just put the bindings in the core assembly so it is actually loaded and the URL schema is known.
Related Issues
I'm having some trouble with the tests, it was straight forward to enable the client and server tests for opc.wss,
but something seems to be wrong with the test infrastructure.
When executing single tests, they pass in milliseconds, but when executing several tests it gets stuck for an hour or longer before it passes (e.g. the client connect tests for opc.wss). And some other tests just fail because the transport channel is suddenly null and or it just timeouts.
I've been using this custom-built version of the SDK and did not experience any issues (which definitly does not mean that there aren't any).
Types of changes
What types of changes does your code introduce?
Checklist
Further comments
Since this is a larger contribution, I again want to point out that I actually did not write most of the code but just took it from the prototypical branch demo/webapi and would require some help to get the tests passing.