Share via


UnixDomainSocketChannel Interface

public interface UnixDomainSocketChannel

The definition for a readable and writable unix ___domain socket channel that may be needed in module creation depending on the Edge runtime.

Method Summary

Modifier and Type Method and Description
void close()

Close the unix ___domain socket.

void open(String address)

Open the unix ___domain socket for the provided address

int read(byte[] inputBuffer)

Read from the unix ___domain socket into the provided input buffer.

void write(byte[] output)

Write the provided bytes to the unix ___domain socket.

Method Details

close

public void close()

Close the unix ___domain socket.

Throws:

IOException - if the unix ___domain socket close fails for any reason.

open

public void open(String address)

Open the unix ___domain socket for the provided address

Parameters:

address - the address to open the connection to.

Throws:

IOException - if the connection fails to open for any reason.

read

public int read(byte[] inputBuffer)

Read from the unix ___domain socket into the provided input buffer.

Parameters:

inputBuffer - the empty byte array to be written to with the read bytes from the unix ___domain socket.

Returns:

the number of bytes read from the unix ___domain socket during this call.

Throws:

IOException - if the unix ___domain socket cannot be read from for any reason.

write

public void write(byte[] output)

Write the provided bytes to the unix ___domain socket.

Parameters:

output - the bytes to write to the unix ___domain socket.

Throws:

IOException - if the bytes fail to write for any reason.

Applies to