Adapter

Functions

Adapter

Adapter

~Adapter

const Address &

GetAddress

const Address &

GetBroadcastAddress

const String &

GetDescription

bool

IsLoopback

void

SetDescription

Detailed Description

class Adapter : public RED::Object

This class defines a network adapter.

@related class RNET::System

It stores the network address of the adapter along with a plain text description. This class is needed by REDnet to handle multiple network adapters configurations.

A full list of the available network adapters on the machine is returned by the call to RNET::System::Initialize. The adapter to use can be explicitely set by calling RNET::System::SetAdapter.

Public Functions

Adapter()

Default constructor.

Adapter(const RNET::Address &iAddress, const RNET::Address &iBroadcastAdress, const RED::String &iDescription, bool iLoopback)

Constructor.

Parameters
  • iAddress – address of the adapter.

  • iBroadcastAdress – broadcast address of the adapter.

  • iDescription – description of the adapter.

  • iLoopback – true if the adapter is a loopback interface, false otherwise.

~Adapter()

Destructor.

const RNET::Address &GetAddress() const
Returns

the address of the adapter.

const RNET::Address &GetBroadcastAddress() const
Returns

the broadcast address of the adapter.

const RED::String &GetDescription() const
Returns

the adapter description.

bool IsLoopback() const
Returns

true if the adapter is a loopback interface, false otherwise.

void SetDescription(const RED::String &iDescription)

Sets the adapter description.