Click or drag to resize

ProtocolInstance Class

This is one instance of a protocol connection (either a client or a server connection), or a protocol server. This class represents one link in the overall protocol stream. Created by Protocol, it manages the protocol for just this link in the stream. Uses the services of, and provides services to, its downstream and upstream instances.
Inheritance Hierarchy
SystemObject
  Demo3D.NetProtocolSocket
    Demo3D.NetProtocolInstance

Namespace:  Demo3D.Net
Assembly:  Demo3D.IO (in Demo3D.IO.dll) Version: 10.0.0.0 (10.0.0.0)
Syntax
C#
public abstract class ProtocolInstance : ProtocolSocket

The ProtocolInstance type exposes the following members.

Constructors
  NameDescription
Protected methodProtocolInstance
Constructs a new ProtocolInstance.
Top
Properties
  NameDescription
Public propertyAddress
The protocol address used by this instance.
(Overrides ProtocolSocketAddress.)
Public propertyDownStream
The downstream socket.
(Inherited from ProtocolSocket.)
Public propertyEditing
True if batch editing.
(Inherited from ProtocolSocket.)
Public propertyID
A description of this instance.
(Overrides ProtocolSocketID.)
Protected propertyInternalRunning
Indicates whether the instance is still running.
Public propertyProperties
Protocol and service properties.
(Overrides ProtocolSocketProperties.)
Public propertyProtocol
The protocol.
Public propertyProtocolProperties
Protocol property bag.
Public propertyRunning
Returns whether the instance is still running.
(Overrides ProtocolSocketRunning.)
Top
Methods
  NameDescription
Public methodAddAspect
Adds an aspect to a socket.
(Inherited from ProtocolSocket.)
Public methodAddOrUpdateAspect
Adds or updates an aspect of the socket.
(Inherited from ProtocolSocket.)
Public methodBeginEdit
Start batch editing.
(Inherited from ProtocolSocket.)
Public methodClose
Closes the socket.
(Overrides ProtocolSocketClose.)
Public methodClose(Exception)
Logs an error, and then closes the socket.
(Inherited from ProtocolSocket.)
Public methodClose(String)
Logs an error, and then closes the socket.
(Inherited from ProtocolSocket.)
Public methodClose(String, String, Object)
Logs an error, and then closes the socket.
(Inherited from ProtocolSocket.)
Public methodEndEdit
End batch editing.
(Inherited from ProtocolSocket.)
Public methodFindAspect(Type)
Returns an aspect of the given type, or return null.
(Inherited from ProtocolSocket.)
Public methodFindAspectT
Returns an aspect of the given type, or return null.
(Inherited from ProtocolSocket.)
Public methodFindService(Type, ServiceBindingFlags)
Returns an object that implements a specific API, or null. For example, an IO API such as IPacketIOService.
(Overrides ProtocolSocketFindService(Type, ServiceBindingFlags).)
Public methodFindServiceT(ServiceBindingFlags)
Returns an object that implements a specific API, or null. For example, an IO API such as IPacketIOService.
(Inherited from ProtocolSocket.)
Protected methodGetDownStream
Returns the downstream socket.
(Inherited from ProtocolSocket.)
Public methodGetHead
Returns the protocol head.
(Overrides ProtocolSocketGetHead.)
Public methodGetOrAddAspect
Adds an aspect to a socket by using the specified function, if the key does not already exist.
(Inherited from ProtocolSocket.)
Public methodGetServiceT
Returns an object that implements a specific API, or throws an exception. For example, an IO API such as IPacketIOService.
(Inherited from ProtocolSocket.)
Public methodGetStream
Returns the head of the protocol stream (the first protocol instance).
(Inherited from ProtocolSocket.)
Protected methodInitializeAsync
When overridden in a derived class, initializes the socket.
(Inherited from ProtocolSocket.)
Protected methodInternalClose
Performs a controlled close.
Protected methodInternalOpenAsync
Opens or reopens the instance.
Protected methodInternalShutdown
Forcibly shuts down the underlying protocol, causing all other users to throw an error.
Protected methodNotifyPropertyChanged(PropertyChangedEventArgs)
Raises the PropertyChanged event.
(Inherited from ProtocolSocket.)
Protected methodNotifyPropertyChanged(String)
Raises the PropertyChanged event.
(Inherited from ProtocolSocket.)
Public methodCode exampleOpen
Opens (or reopens) the socket.
(Inherited from ProtocolSocket.)
Public methodOpenAsync
Opens (or reopens) the socket.
(Overrides ProtocolSocketOpenAsync.)
Public methodRegisterClosing
Registers a function to call when Close has been called but before the socket has been closed.
(Inherited from ProtocolSocket.)
Public methodRegisterOpen
Registers a function to call after the socket is opened, but before the OnOpened event is fired.
(Inherited from ProtocolSocket.)
Public methodRemoveAspect
Removes an aspect from a socket.
(Inherited from ProtocolSocket.)
Public methodSetDownStream
Sets the downstream socket.
(Overrides ProtocolSocketSetDownStream(ProtocolSocket).)
Public methodShutdown
Forcibly shuts down the socket.
(Overrides ProtocolSocketShutdown.)
Public methodShutdown(Exception)
Logs an error, and then shuts down the socket.
(Inherited from ProtocolSocket.)
Public methodShutdown(String)
Logs an error, and then shuts down the socket.
(Inherited from ProtocolSocket.)
Public methodShutdown(String, String, Object)
Logs an error, and then shuts down the socket.
(Overrides ProtocolSocketShutdown(String, String, Object).)
Public methodToString
Returns a description of this socket.
(Overrides ProtocolSocketToString.)
Protected methodTryCreateService
Returns an object that implements a specific API, or null. For example, an IO API such as IPacketIOService.
Public methodTryFindServiceT
Searches for an object that implements a specific API, or null. Only searches on this ProtocolInstance, and does not create the service if it hasn't already been created.
(Inherited from ProtocolSocket.)
Public methodUnregisterClosing
Unregister a previously registered function.
(Inherited from ProtocolSocket.)
Public methodUnregisterOpen
Unregister a previously registered function.
(Inherited from ProtocolSocket.)
Top
Events
  NameDescription
Public eventEditBegun
Raised on the first call to BeginEdit.
(Inherited from ProtocolSocket.)
Public eventEditEnded
Raised on the last call to EndEdit.
(Inherited from ProtocolSocket.)
Public eventOnClosed
Occurs after the socket is closed.
(Inherited from ProtocolSocket.)
Public eventOnOpened
Occurs after the socket is opened.
(Inherited from ProtocolSocket.)
Public eventOnShutdown
Occurs after the socket is shutdown.
(Inherited from ProtocolSocket.)
Public eventPropertyChanged
Occurs when a property value changes.
(Inherited from ProtocolSocket.)
Top
See Also