NewGamePhysics.Networking.InfoLinkTransmitter Class Reference

Class to broadcast InfoLink objects via UDP to an InfoLinkReceiver. More...

Inheritance diagram for NewGamePhysics.Networking.InfoLinkTransmitter:
NewGamePhysics.Networking.InfoLinkNetBase

List of all members.

Public Member Functions

 InfoLinkTransmitter ()
 Creates am InfoLinkTransmitter to broadcast InfoLink objects via UDP on the default port.
 InfoLinkTransmitter (int port)
 Creates am InfoLinkTransmitter to broadcast InfoLink objects via UDP on the specified port.
void StartTransmitter ()
 Connect and start the transmitter thread.
void StopTransmitter ()
 Stop the transmitter thread and disconnect.
void Transmit (InfoLink infoLink)
 Queue InfoLink object for broadcast.
void Transmit (InfoLink[] infoLinks)
 Queue InfoLink objects for broadcast.

Properties

bool Running [get, set]
 Indicates wether the transmitter thread is running.
long Errors [get]
 Gets the number of errors which occured during transmission.
long Transmitted [get]
 Gets the number of transmitted packets.

Detailed Description

Class to broadcast InfoLink objects via UDP to an InfoLinkReceiver.

Definition at line 18 of file InfoLinkTransmitter.cs.


Constructor & Destructor Documentation

NewGamePhysics.Networking.InfoLinkTransmitter.InfoLinkTransmitter (  ) 

Creates am InfoLinkTransmitter to broadcast InfoLink objects via UDP on the default port.

Definition at line 64 of file InfoLinkTransmitter.cs.

00065         {
00066             this.port = InfoLinkNetDefaultPort;
00067         }

NewGamePhysics.Networking.InfoLinkTransmitter.InfoLinkTransmitter ( int  port  ) 

Creates am InfoLinkTransmitter to broadcast InfoLink objects via UDP on the specified port.

Parameters:
port The port to use.

Definition at line 74 of file InfoLinkTransmitter.cs.

00075         {
00076             this.port = port;
00077         }


Member Function Documentation

void NewGamePhysics.Networking.InfoLinkTransmitter.StartTransmitter (  ) 

Connect and start the transmitter thread.

Definition at line 123 of file InfoLinkTransmitter.cs.

00124         {
00125             if (this.Connected)
00126             {
00127                 this.Close();
00128             }
00129 
00130             this.Open();
00131             this.transmitterThread = new Thread(new ThreadStart(RunTransmitterThread));
00132             this.transmitterThread.Name = "InfoLink Transmitter";
00133             this.transmitterThread.IsBackground = true;
00134             this.transmitterThread.Start();
00135         }

void NewGamePhysics.Networking.InfoLinkTransmitter.StopTransmitter (  ) 

Stop the transmitter thread and disconnect.

Definition at line 140 of file InfoLinkTransmitter.cs.

00141         {
00142             if (this.Connected)
00143             {
00144                 this.Close();
00145             }
00146         }

void NewGamePhysics.Networking.InfoLinkTransmitter.Transmit ( InfoLink[]  infoLinks  ) 

Queue InfoLink objects for broadcast.

Parameters:
infoLinks The InfoLink objecst to transmit.

Definition at line 165 of file InfoLinkTransmitter.cs.

00166         {
00167             // Simply add the object to the queue for sending
00168             lock (syncRoot)
00169             {
00170                 transmitQueue.AddRange(infoLinks);
00171             }
00172         }

void NewGamePhysics.Networking.InfoLinkTransmitter.Transmit ( InfoLink  infoLink  ) 

Queue InfoLink object for broadcast.

Parameters:
infoLink The InfoLink object to transmit.

Definition at line 152 of file InfoLinkTransmitter.cs.

00153         {
00154             // Simply add the object to the queue for sending
00155             lock (syncRoot)
00156             {
00157                 transmitQueue.Add(infoLink);
00158             }
00159         }


Property Documentation

long NewGamePhysics.Networking.InfoLinkTransmitter.Errors [get]

Gets the number of errors which occured during transmission.

Definition at line 92 of file InfoLinkTransmitter.cs.

bool NewGamePhysics.Networking.InfoLinkTransmitter.Running [get, set]

Indicates wether the transmitter thread is running.

Definition at line 83 of file InfoLinkTransmitter.cs.

long NewGamePhysics.Networking.InfoLinkTransmitter.Transmitted [get]

Gets the number of transmitted packets.

Definition at line 102 of file InfoLinkTransmitter.cs.


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2