Server behaviour in closing a connection|OPC UA Standard|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Server behaviour in closing a connection
Avatar
Phuong Nguyen
Member
Members
Forum Posts: 16
Member Since:
11/22/2018
sp_UserOfflineSmall Offline
1
08/31/2021 - 01:16
sp_Permalink sp_Print

Hi,

what would be proper behaviour of OPCUA server in processing CloseSecureChannelRequest? In OPC Spec Part 6 V1.04, Section 7.1.4 Closing a connection, it does not explicitly state what the server should do rather than "...releasing all resources allocated for the channel".

Figure 15 of the OPC Spec Part 6, however, illustrates that Transport Connection module of the server initiates closing socket. Should this be done explicitly by calling, for example, socket_close after having released all resources related to the closed secure channel?

If this is the case and socket is configured with linger of, say, 2 minutes, the socket would end up in TIME_WAIT state after the socket is closed gracefully. During this time the socket cannot be used for other connection. Do you have any suggestions for handling socket in this case?

Thank you so much!

Avatar
Randy Armstrong
Admin
Forum Posts: 1564
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
09/01/2021 - 07:09
sp_Permalink sp_Print

The server closing the socket should trigger a socket closed event on the client.

The client would them close the socket which would completely release resources before the linger time expires.

A misbehaving client could leave the socket open. If this is an issue for your server then you can reduce the linger timeout.

Avatar
Phuong Nguyen
Member
Members
Forum Posts: 16
Member Since:
11/22/2018
sp_UserOfflineSmall Offline
3
09/02/2021 - 00:20
sp_Permalink sp_Print

OK. Thank you for the explanation/confirmation and suggestion. I assume then that value of linger timeout is also implementation specific. 

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 20
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1435
Posts: 4855