Documentation

Std.Internal.Async.TCP

Represents a TCP server socket, managing incoming client connections.

Instances For

    Represents a TCP client socket, used to connect to a server.

    Instances For
      @[inline]

      Creates a new TCP server socket.

      Equations
      Instances For
        @[inline]

        Binds the server socket to the specified address. Address reuse is enabled to allow rebinding the same address.

        Equations
        Instances For
          @[inline]

          Listens for incoming connections with the given backlog.

          Equations
          Instances For
            @[inline]

            Accepts an incoming connection.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              @[inline]

              Gets the local address of the server socket.

              Equations
              Instances For
                @[inline]

                Enables the Nagle algorithm for all client sockets accepted by this server socket.

                Equations
                Instances For
                  @[inline]

                  Enables TCP keep-alive for all client sockets accepted by this server socket.

                  Equations
                  Instances For
                    @[inline]

                    Creates a new TCP client socket.

                    Equations
                    Instances For
                      @[inline]

                      Binds the server socket to the specified address. Address reuse is enabled to allow rebinding the same address.

                      Equations
                      Instances For
                        @[inline]

                        Connects the client socket to the given address.

                        Equations
                        Instances For
                          @[inline]

                          Sends data through the client socket.

                          Equations
                          Instances For
                            @[inline]

                            Receives data from the client socket. If data is received, it’s wrapped in .some. If EOF is reached, the result is .none, indicating no more data is available. Receiving data in parallel on the same socket is not supported. Instead, we recommend binding multiple sockets to the same address.

                            Equations
                            Instances For
                              @[inline]

                              Shuts down the write side of the client socket.

                              Equations
                              Instances For
                                @[inline]

                                Gets the remote address of the client socket.

                                Equations
                                Instances For
                                  @[inline]

                                  Gets the local address of the client socket.

                                  Equations
                                  Instances For
                                    @[inline]

                                    Enables the Nagle algorithm for the client socket.

                                    Equations
                                    Instances For
                                      @[inline]

                                      Enables TCP keep-alive with a specified delay for the client socket.

                                      Equations
                                      Instances For