C# Класс Opc.Ua.Bindings.TcpServerChannel

Manages the server side of a UA TCP channel.
Наследование: TcpChannel
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Attach ( uint channelId, Socket socket ) : void

Attaches the channel to an existing socket.

Reconnect ( TcpMessageSocket socket, uint requestId, uint sequenceNumber, X509Certificate2 clientCertificate, TcpChannelToken token, OpenSecureChannelRequest request ) : void

Handles a reconnect request.

SendResponse ( uint requestId, IServiceResponse response ) : void

Sends the response for the specified request.

SetRequestReceivedCallback ( TcpChannelRequestEventHandler callback ) : void

Sets the callback used to receive notifications of new events.

TcpServerChannel ( string contextId, UaTcpChannelListener listener, BufferManager bufferManager, TcpChannelQuotas quotas, X509Certificate2 serverCertificate, EndpointDescriptionCollection endpoints ) : System

Attaches the object to an existing socket.

Защищенные методы

Метод Описание
ForceChannelFault ( Exception exception, uint defaultCode, string format ) : void

Forces the channel into a faulted state as a result of a fatal error.

ForceChannelFault ( ServiceResult reason ) : void

Forces the channel into a faulted state as a result of a fatal error.

ForceChannelFault ( uint statusCode, string format ) : void

Forces the channel into a faulted state as a result of a fatal error.

GetNewTokenId ( ) : uint

Returns a new token id.

HandleIncomingMessage ( uint messageType, ArraySegment messageChunk ) : bool

Processes an incoming message.

HandleSocketError ( ServiceResult result ) : void

Handles a socket error.

SendErrorMessage ( ServiceResult error ) : void

Sends an error message over the socket.

Приватные методы

Метод Описание
ChannelClosed ( ) : void

Closes the channel and releases resources.

Dispose ( bool disposing ) : void
OnChannelReconnected ( object state ) : void

Called to send queued responses after a reconnect.

OnCleanup ( object state ) : void

Called when the channel needs to be cleaned up.

ProcessCloseSecureChannelRequest ( uint messageType, ArraySegment messageChunk ) : bool

Processes an CloseSecureChannel request message.

ProcessHelloMessage ( uint messageType, ArraySegment messageChunk ) : bool
ProcessOpenSecureChannelRequest ( uint messageType, ArraySegment messageChunk ) : bool

Processes an OpenSecureChannel request message.

ProcessRequestMessage ( uint messageType, ArraySegment messageChunk ) : bool

Processes a request message.

SendOpenSecureChannelResponse ( uint requestId, TcpChannelToken token, OpenSecureChannelRequest request ) : void

Sends an OpenSecureChannel response.

SendServiceFault ( TcpChannelToken token, uint requestId, ServiceResult fault ) : void

Sends a fault response secured with the symmetric keys.

SendServiceFault ( uint requestId, ServiceResult fault ) : void

Sends a fault response secured with the asymmetric keys.

StartCleanupTimer ( ServiceResult reason ) : void

Starts a timer that will clean up the channel if it is not opened/re-opened.

Описание методов

Attach() публичный Метод

Attaches the channel to an existing socket.
public Attach ( uint channelId, Socket socket ) : void
channelId uint
socket Socket
Результат void

ForceChannelFault() защищенный Метод

Forces the channel into a faulted state as a result of a fatal error.
protected ForceChannelFault ( Exception exception, uint defaultCode, string format ) : void
exception System.Exception
defaultCode uint
format string
Результат void

ForceChannelFault() защищенный Метод

Forces the channel into a faulted state as a result of a fatal error.
protected ForceChannelFault ( ServiceResult reason ) : void
reason ServiceResult
Результат void

ForceChannelFault() защищенный Метод

Forces the channel into a faulted state as a result of a fatal error.
protected ForceChannelFault ( uint statusCode, string format ) : void
statusCode uint
format string
Результат void

GetNewTokenId() защищенный Метод

Returns a new token id.
protected GetNewTokenId ( ) : uint
Результат uint

HandleIncomingMessage() защищенный Метод

Processes an incoming message.
protected HandleIncomingMessage ( uint messageType, ArraySegment messageChunk ) : bool
messageType uint
messageChunk ArraySegment
Результат bool

HandleSocketError() защищенный Метод

Handles a socket error.
protected HandleSocketError ( ServiceResult result ) : void
result ServiceResult
Результат void

Reconnect() публичный Метод

Handles a reconnect request.
public Reconnect ( TcpMessageSocket socket, uint requestId, uint sequenceNumber, X509Certificate2 clientCertificate, TcpChannelToken token, OpenSecureChannelRequest request ) : void
socket TcpMessageSocket
requestId uint
sequenceNumber uint
clientCertificate System.Security.Cryptography.X509Certificates.X509Certificate2
token TcpChannelToken
request OpenSecureChannelRequest
Результат void

SendErrorMessage() защищенный Метод

Sends an error message over the socket.
protected SendErrorMessage ( ServiceResult error ) : void
error ServiceResult
Результат void

SendResponse() публичный Метод

Sends the response for the specified request.
public SendResponse ( uint requestId, IServiceResponse response ) : void
requestId uint
response IServiceResponse
Результат void

SetRequestReceivedCallback() публичный Метод

Sets the callback used to receive notifications of new events.
public SetRequestReceivedCallback ( TcpChannelRequestEventHandler callback ) : void
callback TcpChannelRequestEventHandler
Результат void

TcpServerChannel() публичный Метод

Attaches the object to an existing socket.
public TcpServerChannel ( string contextId, UaTcpChannelListener listener, BufferManager bufferManager, TcpChannelQuotas quotas, X509Certificate2 serverCertificate, EndpointDescriptionCollection endpoints ) : System
contextId string
listener UaTcpChannelListener
bufferManager BufferManager
quotas TcpChannelQuotas
serverCertificate System.Security.Cryptography.X509Certificates.X509Certificate2
endpoints EndpointDescriptionCollection
Результат System