Lines Matching +full:network +full:- +full:based
2 # Use of this source code is governed by a BSD-style license that can be
12 from crossbench.network.traffic_shaping.live import NoTrafficShaper
17 from crossbench.network.traffic_shaping.base import TrafficShaper
21 class Network(abc.ABC): class
25 browser_platform: plt.Platform = plt.PLATFORM) -> None:
32 def traffic_shaper(self) -> TrafficShaper:
36 def browser_platform(self) -> plt.Platform:
40 def host_platform(self) -> plt.Platform:
44 def is_running(self) -> bool:
48 def is_live(self) -> bool:
49 """Return True if the network is the default live/direct connection, as
50 opposed to a replay network or local file server."""
54 def is_wpr(self) -> bool:
55 """Return True if the network is the replay network."""
59 def is_local_file_server(self) -> bool:
60 """Return True if the network is the local file server network."""
64 def http_port(self) -> Optional[int]:
65 """HTTP port for non-live server-based networks."""
69 def https_port(self) -> Optional[int]:
70 """HTTPS port for non-live server-based networks."""
74 def host(self) -> Optional[str]:
75 """Host for non-live server-based networks."""
78 def extra_flags(self, browser_attributes: BrowserAttributes) -> Flags:
79 assert self.is_running, "Network is not running."
83 def open(self, session: BrowserSessionRunGroup) -> Iterator[Network]:
85 assert not self._is_running, "Cannot start network more than once."