Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
opcua-asyncio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nikola Balog
opcua-asyncio
Commits
96fb1eb3
Commit
96fb1eb3
authored
Jun 08, 2022
by
Alexander Schrode
Committed by
oroulet
Jun 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix _open_secure_channel_exchange typehints
parent
0dff796d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
asyncua/client/ua_client.py
asyncua/client/ua_client.py
+6
-5
No files found.
asyncua/client/ua_client.py
View file @
96fb1eb3
...
...
@@ -39,7 +39,7 @@ class UASocketProtocol(asyncio.Protocol):
self
.
closed
:
bool
=
False
# needed to pass params from asynchronous request to synchronous data receive callback, as well as
# passing back the processed response to the request so that it can return it.
self
.
_open_secure_channel_exchange
:
Optional
[
ua
.
OpenSecureChannelRespons
e
]
=
None
self
.
_open_secure_channel_exchange
:
Union
[
ua
.
OpenSecureChannelResponse
,
ua
.
OpenSecureChannelParameters
,
Non
e
]
=
None
def
connection_made
(
self
,
transport
:
asyncio
.
Transport
):
# type: ignore
self
.
state
=
self
.
OPEN
...
...
@@ -78,10 +78,11 @@ class UASocketProtocol(asyncio.Protocol):
msg
=
self
.
_connection
.
receive_from_header_and_body
(
header
,
buf
)
self
.
_process_received_message
(
msg
)
if
header
.
MessageType
==
ua
.
MessageType
.
SecureOpen
:
params
=
self
.
_open_secure_channel_exchange
self
.
_open_secure_channel_exchange
=
struct_from_binary
(
ua
.
OpenSecureChannelResponse
,
msg
.
body
())
self
.
_open_secure_channel_exchange
.
ResponseHeader
.
ServiceResult
.
check
()
# type: ignore
self
.
_connection
.
set_channel
(
self
.
_open_secure_channel_exchange
.
Parameters
,
params
.
RequestType
,
params
.
ClientNonce
)
# type: ignore
params
:
ua
.
OpenSecureChannelParameters
=
self
.
_open_secure_channel_exchange
response
:
ua
.
OpenSecureChannelResponse
=
struct_from_binary
(
ua
.
OpenSecureChannelResponse
,
msg
.
body
())
response
.
ResponseHeader
.
ServiceResult
.
check
()
self
.
_open_secure_channel_exchange
=
response
self
.
_connection
.
set_channel
(
response
.
Parameters
,
params
.
RequestType
,
params
.
ClientNonce
)
if
not
buf
:
return
# Buffer still has bytes left, try to process again
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment