diff options
author | lbsa71 | 2007-10-30 09:05:31 +0000 |
---|---|---|
committer | lbsa71 | 2007-10-30 09:05:31 +0000 |
commit | 67e12b95ea7b68f4904a7484d77ecfd787d16d0c (patch) | |
tree | 20b00d24c8a7617017960432ec044852e3ad5fa9 /OpenSim/Framework/Servers/UDPServerBase.cs | |
parent | * Deleted .user file (diff) | |
download | opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.zip opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.gz opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.bz2 opensim-SC_OLD-67e12b95ea7b68f4904a7484d77ecfd787d16d0c.tar.xz |
* Optimized usings
* Shortened type references
* Removed redundant 'this' qualifier
Diffstat (limited to 'OpenSim/Framework/Servers/UDPServerBase.cs')
-rw-r--r-- | OpenSim/Framework/Servers/UDPServerBase.cs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/OpenSim/Framework/Servers/UDPServerBase.cs b/OpenSim/Framework/Servers/UDPServerBase.cs index 8fc32ff..017168f 100644 --- a/OpenSim/Framework/Servers/UDPServerBase.cs +++ b/OpenSim/Framework/Servers/UDPServerBase.cs | |||
@@ -51,7 +51,7 @@ namespace OpenSim.Framework.Servers | |||
51 | protected virtual void OnReceivedData(IAsyncResult result) | 51 | protected virtual void OnReceivedData(IAsyncResult result) |
52 | { | 52 | { |
53 | ipeSender = new IPEndPoint(IPAddress.Parse("0.0.0.0"), 0); | 53 | ipeSender = new IPEndPoint(IPAddress.Parse("0.0.0.0"), 0); |
54 | epSender = (EndPoint)ipeSender; | 54 | epSender = (EndPoint) ipeSender; |
55 | Packet packet = null; | 55 | Packet packet = null; |
56 | int numBytes = Server.EndReceiveFrom(result, ref epSender); | 56 | int numBytes = Server.EndReceiveFrom(result, ref epSender); |
57 | int packetEnd = numBytes - 1; | 57 | int packetEnd = numBytes - 1; |
@@ -67,21 +67,18 @@ namespace OpenSim.Framework.Servers | |||
67 | 67 | ||
68 | public virtual void ServerListener() | 68 | public virtual void ServerListener() |
69 | { | 69 | { |
70 | |||
71 | ServerIncoming = new IPEndPoint(IPAddress.Parse("0.0.0.0"), listenPort); | 70 | ServerIncoming = new IPEndPoint(IPAddress.Parse("0.0.0.0"), listenPort); |
72 | Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); | 71 | Server = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); |
73 | Server.Bind(ServerIncoming); | 72 | Server.Bind(ServerIncoming); |
74 | 73 | ||
75 | ipeSender = new IPEndPoint(IPAddress.Parse("0.0.0.0"), 0); | 74 | ipeSender = new IPEndPoint(IPAddress.Parse("0.0.0.0"), 0); |
76 | epSender = (EndPoint)ipeSender; | 75 | epSender = (EndPoint) ipeSender; |
77 | ReceivedData = new AsyncCallback(this.OnReceivedData); | 76 | ReceivedData = new AsyncCallback(OnReceivedData); |
78 | Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); | 77 | Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); |
79 | } | 78 | } |
80 | 79 | ||
81 | public virtual void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode) | 80 | public virtual void SendPacketTo(byte[] buffer, int size, SocketFlags flags, uint circuitcode) |
82 | { | 81 | { |
83 | |||
84 | } | 82 | } |
85 | } | 83 | } |
86 | } | 84 | } \ No newline at end of file |
87 | |||