Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Dispose() [2/2]

virtual void System.Net.Sockets.UdpClient.Dispose ( bool disposing)
inlineprotectedvirtual

Definition at line 183 of file UdpClient.cs.

184 {
185 if (!disposing)
186 {
187 return;
188 }
189 if (System.Net.NetEventSource.Log.IsEnabled())
190 {
191 System.Net.NetEventSource.Info(this, null, "Dispose");
192 }
193 if (!_disposed)
194 {
195 Socket clientSocket = _clientSocket;
196 if (clientSocket != null)
197 {
198 clientSocket.InternalShutdown(SocketShutdown.Both);
199 clientSocket.Dispose();
200 _clientSocket = null;
201 }
202 _disposed = true;
203 GC.SuppressFinalize(this);
204 }
205 }
static readonly System.Net.NetEventSource Log
static void Info(object thisOrContextObject, FormattableString formattableString=null, [CallerMemberName] string memberName=null)
void InternalShutdown(SocketShutdown how)
Definition Socket.cs:3435

References System.Net.Sockets.UdpClient._clientSocket, System.Net.Sockets.UdpClient._disposed, System.Net.Sockets.Socket.Dispose(), System.Net.NetEventSource.Info(), System.Net.Sockets.Socket.InternalShutdown(), System.Net.NetEventSource.Log, and System.GC.SuppressFinalize().