Class representing an InfoLink UDP Receiver. More...
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. | |
Class representing an InfoLink UDP Receiver.
Definition at line 17 of file InfoLinkReceiver.cs.
| NewGamePhysics.Networking.InfoLinkReceiver.InfoLinkReceiver | ( | ReceiverHandler | handler | ) |
Creates am InfoLinkReceiver to receive InfoLink objects via UDP on the default port.
| 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.
| handler | The callback to handle received InfoLinks. | |
| port | The port to use. |
Definition at line 57 of file InfoLinkReceiver.cs.
| delegate void NewGamePhysics.Networking.InfoLinkReceiver.ReceiverHandler | ( | InfoLink | infoLink | ) |
Delegate which handles the received InfoLink objects.
| 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 }
bool NewGamePhysics.Networking.InfoLinkReceiver.Running [get, set] |
Indicates wether the listener thread is running.
Definition at line 78 of file InfoLinkReceiver.cs.
1.6.2