Faultline API Reference

All Types / Faultline.Interception

class SimSocketHooks

public static class SimSocketHooks

Interception targets for raw Socket TCP client/server operations. Routes Socket bind, listen, accept, connect, send, and receive calls over SimNetwork when running inside a Faultline simulation.

Methods

public static Socket CreateSocket(AddressFamily addressFamily, SocketType socketType, ProtocolType protocolType)
public static Socket CreateSocket(SocketType socketType, ProtocolType protocolType)
public static void Bind(Socket socket, EndPoint localEP)
public static void Listen(Socket socket)
public static void Listen(Socket socket, int backlog)
public static Task<Socket> AcceptAsync(Socket socket)
public static async ValueTask<Socket> AcceptAsync(Socket socket, CancellationToken cancellationToken)
public static Task ConnectAsync(Socket socket, EndPoint remoteEP)
public static ValueTask ConnectAsync(Socket socket, EndPoint remoteEP, CancellationToken cancellationToken)
public static Task ConnectAsync(Socket socket, string host, int port)
public static ValueTask ConnectAsync(Socket socket, string host, int port, CancellationToken cancellationToken)
public static Task ConnectAsync(Socket socket, IPAddress address, int port)
public static ValueTask ConnectAsync(Socket socket, IPAddress address, int port, CancellationToken cancellationToken)
public static ValueTask<int> SendAsync(Socket socket, ReadOnlyMemory<byte> buffer, SocketFlags socketFlags, CancellationToken cancellationToken)
public static ValueTask<int> SendAsync(Socket socket, ReadOnlyMemory<byte> buffer, CancellationToken cancellationToken)
public static Task<int> SendAsync(Socket socket, ArraySegment<byte> buffer, SocketFlags socketFlags)
public static ValueTask<int> ReceiveAsync(Socket socket, Memory<byte> buffer, SocketFlags socketFlags, CancellationToken cancellationToken)
public static ValueTask<int> ReceiveAsync(Socket socket, Memory<byte> buffer, CancellationToken cancellationToken)
public static Task<int> ReceiveAsync(Socket socket, ArraySegment<byte> buffer, SocketFlags socketFlags)
public static void Shutdown(Socket socket, SocketShutdown how)
public static void Close(Socket socket)
public static void Dispose(Socket socket)