OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Protected Attributes | Properties | List of all members
OpenMetaverse.OpenSimUDPBase Class Referenceabstract

Base UDP server More...

Inheritance diagram for OpenMetaverse.OpenSimUDPBase:
Inheritance graph
[legend]

Public Member Functions

abstract void PacketReceived (UDPPacketBuffer buffer)
 This method is called when an incoming packet is received More...
 
 OpenSimUDPBase (IPAddress bindAddress, int port)
 Default constructor More...
 
virtual void StartInbound (int recvBufferSize, bool asyncPacketHandling)
 Start inbound UDP packet handling. More...
 
virtual void StartOutbound ()
 Start outbound UDP packet handling. More...
 
virtual void StopInbound ()
 
virtual void StopOutbound ()
 
virtual bool EnablePools ()
 
virtual bool DisablePools ()
 
void AsyncBeginSend (UDPPacketBuffer buf)
 

Protected Attributes

int m_udpPort
 UDP port to bind to in server mode More...
 
IPAddress m_localBindAddress
 Local IP address to bind to in server mode More...
 

Properties

bool UsePools [get, set]
 Are we to use object pool(s) to reduce memory churn when receiving data? More...
 
OpenSim.Framework.Pool
< UDPPacketBuffer > 
Pool [get, set]
 Pool to use for handling data. May be null if UsePools = false; More...
 
bool IsRunningInbound [get, set]
 Returns true if the server is currently listening for inbound packets, otherwise false More...
 
bool IsRunningOutbound [get, set]
 Returns true if the server is currently sending outbound packets, otherwise false More...
 
int UdpReceives [get, set]
 Number of UDP receives. More...
 
int UdpSends [get, set]
 Number of UDP sends More...
 
float AverageReceiveTicksForLastSamplePeriod [get, set]
 The average time taken for each require receive in the last sample. More...
 

Detailed Description

Base UDP server

Definition at line 41 of file OpenSimUDPBase.cs.

Constructor & Destructor Documentation

OpenMetaverse.OpenSimUDPBase.OpenSimUDPBase ( IPAddress  bindAddress,
int  port 
)
inline

Default constructor

Parameters
bindAddressLocal IP address to bind the server to
portPort to listening for incoming UDP packets on

///

Parameters
usePoolAre we to use an object pool to get objects for handing inbound data?

Definition at line 172 of file OpenSimUDPBase.cs.

Member Function Documentation

void OpenMetaverse.OpenSimUDPBase.AsyncBeginSend ( UDPPacketBuffer  buf)
inline

Definition at line 465 of file OpenSimUDPBase.cs.

virtual bool OpenMetaverse.OpenSimUDPBase.DisablePools ( )
inlinevirtual

Reimplemented in OpenSim.Region.ClientStack.LindenUDP.LLUDPServer.

Definition at line 304 of file OpenSimUDPBase.cs.

virtual bool OpenMetaverse.OpenSimUDPBase.EnablePools ( )
inlinevirtual

Reimplemented in OpenSim.Region.ClientStack.LindenUDP.LLUDPServer.

Definition at line 290 of file OpenSimUDPBase.cs.

abstract void OpenMetaverse.OpenSimUDPBase.PacketReceived ( UDPPacketBuffer  buffer)
pure virtual

This method is called when an incoming packet is received

Parameters
bufferIncoming packet buffer

Implemented in OpenSim.Region.ClientStack.LindenUDP.LLUDPServer.

virtual void OpenMetaverse.OpenSimUDPBase.StartInbound ( int  recvBufferSize,
bool  asyncPacketHandling 
)
inlinevirtual

Start inbound UDP packet handling.

Parameters
recvBufferSizeThe size of the receive buffer for the UDP socket. This value is passed up to the operating system and used in the system networking stack. Use zero to leave this value as the default
asyncPacketHandlingSet this to true to start receiving more packets while current packet handler callbacks are still running. Setting this to false will complete each packet callback before the next packet is processed

This method will attempt to set the SIO_UDP_CONNRESET flag on the socket to get newer versions of Windows to behave in a sane manner (not throwing an exception when the remote side resets the connection). This call is ignored on Mono where the flag is not necessary

Definition at line 198 of file OpenSimUDPBase.cs.

virtual void OpenMetaverse.OpenSimUDPBase.StartOutbound ( )
inlinevirtual

Start outbound UDP packet handling.

Reimplemented in OpenSim.Region.ClientStack.LindenUDP.LLUDPServer.

Definition at line 265 of file OpenSimUDPBase.cs.

virtual void OpenMetaverse.OpenSimUDPBase.StopInbound ( )
inlinevirtual

Definition at line 272 of file OpenSimUDPBase.cs.

virtual void OpenMetaverse.OpenSimUDPBase.StopOutbound ( )
inlinevirtual

Definition at line 283 of file OpenSimUDPBase.cs.

Member Data Documentation

IPAddress OpenMetaverse.OpenSimUDPBase.m_localBindAddress
protected

Local IP address to bind to in server mode

Definition at line 55 of file OpenSimUDPBase.cs.

int OpenMetaverse.OpenSimUDPBase.m_udpPort
protected

UDP port to bind to in server mode

Definition at line 52 of file OpenSimUDPBase.cs.

Property Documentation

float OpenMetaverse.OpenSimUDPBase.AverageReceiveTicksForLastSamplePeriod
getset

The average time taken for each require receive in the last sample.

Definition at line 108 of file OpenSimUDPBase.cs.

bool OpenMetaverse.OpenSimUDPBase.IsRunningInbound
getset

Returns true if the server is currently listening for inbound packets, otherwise false

Definition at line 74 of file OpenSimUDPBase.cs.

bool OpenMetaverse.OpenSimUDPBase.IsRunningOutbound
getset

Returns true if the server is currently sending outbound packets, otherwise false

If IsRunningOut = false, then any request to send a packet is simply dropped.

Definition at line 78 of file OpenSimUDPBase.cs.

OpenSim.Framework.Pool<UDPPacketBuffer> OpenMetaverse.OpenSimUDPBase.Pool
getsetprotected

Pool to use for handling data. May be null if UsePools = false;

Definition at line 71 of file OpenSimUDPBase.cs.

int OpenMetaverse.OpenSimUDPBase.UdpReceives
getset

Number of UDP receives.

Definition at line 83 of file OpenSimUDPBase.cs.

int OpenMetaverse.OpenSimUDPBase.UdpSends
getset

Number of UDP sends

Definition at line 88 of file OpenSimUDPBase.cs.

bool OpenMetaverse.OpenSimUDPBase.UsePools
getset

Are we to use object pool(s) to reduce memory churn when receiving data?

Definition at line 66 of file OpenSimUDPBase.cs.


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