Interface WasiSocketOpt

    • Method Detail

      • setNonBlocking

        void setNonBlocking​(boolean on)
                     throws IOException
        Enable/disable the non blocking state on this WasiIO
        Parameters:
        on - whether to enable or disable the non-blocking socket option
        Throws:
        IOException - if an I/O error occurs.
      • setReuseAddress

        void setReuseAddress​(boolean on)
                      throws IOException
        Enable/disable the reuse address socket option.
        Parameters:
        on - whether to enable or disable the reuse address socket option
        Throws:
        IOException - if an I/O error occurs.
      • setBroadcast

        void setBroadcast​(boolean on)
                   throws IOException
        Enable/disable the SO_BROADCAST socket option. Only meaningful for datagram sockets; stream sockets should ignore this call.
        Parameters:
        on - whether to enable or disable broadcast
        Throws:
        IOException - if an I/O error occurs.
      • getBroadcast

        boolean getBroadcast()
                      throws IOException
        Get the SO_BROADCAST socket option. Only meaningful for datagram sockets; stream and server sockets always return false.
        Returns:
        whether broadcast is enabled
        Throws:
        IOException - if an I/O error occurs.
      • setReceiveBufferSize

        void setReceiveBufferSize​(int size)
                           throws IOException
        Set the receive buffer size (SO_RCVBUF).
        Parameters:
        size - the buffer size in bytes
        Throws:
        IOException - if an I/O error occurs.
      • getReceiveBufferSize

        int getReceiveBufferSize()
                          throws IOException
        Get the receive buffer size (SO_RCVBUF).
        Returns:
        the buffer size in bytes
        Throws:
        IOException - if an I/O error occurs.
      • setSendBufferSize

        void setSendBufferSize​(int size)
                        throws IOException
        Set the send buffer size (SO_SNDBUF).
        Parameters:
        size - the buffer size in bytes
        Throws:
        IOException - if an I/O error occurs.
      • getSendBufferSize

        int getSendBufferSize()
                       throws IOException
        Get the send buffer size (SO_SNDBUF).
        Returns:
        the buffer size in bytes
        Throws:
        IOException - if an I/O error occurs.