Click or drag to resize

Protocol Class

Represents one protocol.
Inheritance Hierarchy
SystemObject
  Demo3D.NetProtocol

Namespace:  Demo3D.Net
Assembly:  Demo3D.IO (in Demo3D.IO.dll) Version: 10.0.0.0 (10.0.0.0)
Syntax
C#
[TypeConverterAttribute(typeof(ExpandableObjectConverter))]
public abstract class Protocol : IDisposable

The Protocol type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyName
The protocol name.
Public propertySupportedServices
Returns a list of supported service types. These are the services that ProtocolSocket.FindService can return.
Top
Methods
  NameDescription
Protected methodCreateCanonicalAddress

Returns the full address. Eg add in a default port number. Should return an address that uniquely identifies the peer.

The address should explicitly contain any information required to connect (including any defaults), but exclude any connection parameters, routing information, etc, unless required to identify the peer. Ambiguous parts of the address should be standardised - eg where information is case insensitive, it should be converted to lower case. Any parts of the address not required should be removed.

(The framework will automatically convert hostnames to an appropriate IP address, and will set the scheme correctly, so no need to modify those parts.)

Protected methodCreateDownStreamAddress
Creates the downstream address given an upstream address and a downstream protocol. Normally this does not need to be overridden, but there are some cases where it's required. For example, the downstream address returned by COTP for "cotp://host/tsap" would be "tpkt://host:102". Or you can return null to stop the protocol stack from building downstream protocol instances. You might do this if you want to take control of building the downstream protocol instances, or nor build them at all.
Public methodDispose
Releases all protocol resources.
Protected methodNewInstance
Create a new server/client protocol instance.
Public methodRegisterService
Registers a service.
Public methodSupportsService
Returns whether a particular service is supported.
Public methodToString
Returns the name of the protocol.
(Overrides ObjectToString.)
Public methodUnregisterService
Unregisters a service.
Top
Fields
  NameDescription
Public fieldStatic memberRegistry
A register of all protocols.
Top
See Also