# NewGamePhysics.Networking.InfoLinkReceiver Class Reference

Class representing an InfoLink UDP Receiver. More...

Inheritance diagram for NewGamePhysics.Networking.InfoLinkReceiver:

List of all members.

## Public Member Functions
delegate void | ReceiverHandler (InfoLink infoLink)
| Delegate which handles the received InfoLink objects.
| InfoLinkReceiver (ReceiverHandler handler)
| Creates am InfoLinkReceiver to receive InfoLink objects via UDP on the default port.
| InfoLinkReceiver (ReceiverHandler handler, int port)
| Creates am InfoLinkReceiver to receive InfoLink objects via UDP on the specified port.
void | StartListener ()
| Start the listener thread.
void | StopListener ()
| Stop the listener thread.
## Properties
bool | Running`[get, set]`
| Indicates wether the listener thread is running.

## Detailed Description

Class representing an InfoLink UDP Receiver.

Definition at line 17 of file InfoLinkReceiver.cs.

## Constructor & Destructor Documentation

NewGamePhysics.Networking.InfoLinkReceiver.InfoLinkReceiver | ( | ReceiverHandler | handler | ) |

Creates am InfoLinkReceiver to receive InfoLink objects via UDP on the default port.

Parameters:

  | handler | The callback to handle received InfoLinks.

Definition at line 45 of file InfoLinkReceiver.cs.

    00046         {
    00047             this.handler = handler;
    00048             this.port = InfoLinkNetDefaultPort;
    00049         }

NewGamePhysics.Networking.InfoLinkReceiver.InfoLinkReceiver | ( | ReceiverHandler | handler,
|  | int | port |
| ) |  |  |

Creates am InfoLinkReceiver to receive InfoLink objects via UDP on the specified port.

Parameters:

  | handler | The callback to handle received InfoLinks.
  | port | The port to use.

Definition at line 57 of file InfoLinkReceiver.cs.

    00058         {
    00059             this.handler = handler;
    00060             this.port = port;
    00061         }

## Member Function Documentation

delegate void NewGamePhysics.Networking.InfoLinkReceiver.ReceiverHandler | ( | InfoLink | infoLink | ) |

Delegate which handles the received InfoLink objects.

Parameters:

  | infoLink |

void NewGamePhysics.Networking.InfoLinkReceiver.StartListener | ( |  | ) |

Start the listener thread.

Definition at line 86 of file InfoLinkReceiver.cs.

    00087         {
    00088             if (this.Connected)
    00089             {
    00090                 this.Close();
    00091             }
    00092
    00093             this.Open();
    00094             this.listenerThread = new Thread(new ThreadStart(RunListenerThread));
    00095             this.listenerThread.Name = "InfoLink Receiver";
    00096             this.listenerThread.IsBackground = true;
    00097             this.listenerThread.Start();
    00098         }

void NewGamePhysics.Networking.InfoLinkReceiver.StopListener | ( |  | ) |

Stop the listener thread.

Definition at line 103 of file InfoLinkReceiver.cs.

    00104         {
    00105             if (this.Connected)
    00106             {
    00107                 this.Close();
    00108             }
    00109         }

## Property Documentation

bool NewGamePhysics.Networking.InfoLinkReceiver.Running`[get, set]`

Indicates wether the listener thread is running.

Definition at line 78 of file InfoLinkReceiver.cs.

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

- C:/Users/Andreas Schiffler/Desktop/SVN/NewGamePhysics/NewGamePhysics/Networking/InfoLinkReceiver.cs