public void Dispose() { foreach (var socket in _endpointsToSockets.Values) { socket.Dispose(); } _context.Dispose(); } }