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

◆ OnEventCommand()

override void System.Net.Sockets.SocketsTelemetry.OnEventCommand ( EventCommandEventArgs command)
inlineprotectedvirtual

Reimplemented from System.Diagnostics.Tracing.EventSource.

Definition at line 163 of file SocketsTelemetry.cs.

164 {
165 if (command.Command != EventCommand.Enable)
166 {
167 return;
168 }
170 {
171 _outgoingConnectionsEstablishedCounter = new PollingCounter("outgoing-connections-established", this, () => Interlocked.Read(ref _outgoingConnectionsEstablished))
172 {
173 DisplayName = "Outgoing Connections Established"
174 };
175 }
177 {
178 _incomingConnectionsEstablishedCounter = new PollingCounter("incoming-connections-established", this, () => Interlocked.Read(ref _incomingConnectionsEstablished))
179 {
180 DisplayName = "Incoming Connections Established"
181 };
182 }
183 if (_bytesReceivedCounter == null)
184 {
185 _bytesReceivedCounter = new PollingCounter("bytes-received", this, () => Interlocked.Read(ref _bytesReceived))
186 {
187 DisplayName = "Bytes Received"
188 };
189 }
190 if (_bytesSentCounter == null)
191 {
192 _bytesSentCounter = new PollingCounter("bytes-sent", this, () => Interlocked.Read(ref _bytesSent))
193 {
194 DisplayName = "Bytes Sent"
195 };
196 }
197 if (_datagramsReceivedCounter == null)
198 {
199 _datagramsReceivedCounter = new PollingCounter("datagrams-received", this, () => Interlocked.Read(ref _datagramsReceived))
200 {
201 DisplayName = "Datagrams Received"
202 };
203 }
204 if (_datagramsSentCounter == null)
205 {
206 _datagramsSentCounter = new PollingCounter("datagrams-sent", this, () => Interlocked.Read(ref _datagramsSent))
207 {
208 DisplayName = "Datagrams Sent"
209 };
210 }
211 }
PollingCounter _outgoingConnectionsEstablishedCounter
PollingCounter _incomingConnectionsEstablishedCounter
static long Read(ref long location)

References System.Net.Sockets.SocketsTelemetry._bytesReceived, System.Net.Sockets.SocketsTelemetry._bytesReceivedCounter, System.Net.Sockets.SocketsTelemetry._bytesSent, System.Net.Sockets.SocketsTelemetry._bytesSentCounter, System.Net.Sockets.SocketsTelemetry._datagramsReceived, System.Net.Sockets.SocketsTelemetry._datagramsReceivedCounter, System.Net.Sockets.SocketsTelemetry._datagramsSent, System.Net.Sockets.SocketsTelemetry._datagramsSentCounter, System.Net.Sockets.SocketsTelemetry._incomingConnectionsEstablished, System.Net.Sockets.SocketsTelemetry._incomingConnectionsEstablishedCounter, System.Net.Sockets.SocketsTelemetry._outgoingConnectionsEstablished, System.Net.Sockets.SocketsTelemetry._outgoingConnectionsEstablishedCounter, System.Diagnostics.Tracing.EventCommandEventArgs.Command, and System.Threading.Interlocked.Read().