public static TcpClient CreateTcpClient()All Types / Faultline.Interception
class SimTcpHooks
public static class SimTcpHooks
Interception targets for TcpClient and TcpListener. Routes TCP connections and listeners over SimNetwork when executing inside a Faultline simulation without opening OS sockets.
Methods
public static TcpClient CreateTcpClient(AddressFamily family)public static Task ConnectAsync(TcpClient client, string host, int port)public static ValueTask ConnectAsync(TcpClient client, string host, int port, CancellationToken cancellationToken)public static Task ConnectAsync(TcpClient client, IPAddress address, int port)public static ValueTask ConnectAsync(TcpClient client, IPAddress address, int port, CancellationToken cancellationToken)public static ValueTask ConnectAsync(TcpClient client, IPEndPoint remoteEP, CancellationToken cancellationToken)public static NetworkStream GetStream(TcpClient client)public static bool GetConnected(TcpClient client)public static void CloseClient(TcpClient client)public static void DisposeClient(TcpClient client)public static TcpListener CreateTcpListener(IPAddress localaddr, int port)public static TcpListener CreateTcpListener(IPEndPoint localEP)public static void StartListener(TcpListener listener)public static void StartListener(TcpListener listener, int backlog)public static void StopListener(TcpListener listener)public static void DisposeListener(TcpListener listener)public static Task<TcpClient> AcceptTcpClientAsync(TcpListener listener)public static async ValueTask<TcpClient> AcceptTcpClientAsync(TcpListener listener, CancellationToken cancellationToken)public static EndPoint GetLocalEndpoint(TcpListener listener)