Protocol

Class for retrieving protocol information.

Members

Functions

getProtocolByName
bool getProtocolByName(const(char)[] name)
getProtocolByType
bool getProtocolByType(ProtocolType type)

Variables

aliases
string[] aliases;
name
string name;

These members are populated when one of the following functions are called successfully:

type
ProtocolType type;

These members are populated when one of the following functions are called successfully:

Examples

auto proto = new Protocol;
writeln("About protocol TCP:");
if (proto.getProtocolByType(ProtocolType.TCP))
{
    writefln("  Name: %s", proto.name);
    foreach (string s; proto.aliases)
         writefln("  Alias: %s", s);
}
else
    writeln("  No information found");

Meta