Ktor Socket Client
Client class for managing the connection to the PGN daemon.
This is the class responsible for managing the underlying socket connections, and sending raw byte data back and forth over the socket.
It is a generic socket class, and does not contain any logic which is specific to PGN.
If you are implementing this class, chances are that you want the PicoGpioNetClient class instead.
Example usage:
val response = KtorSocketClient().use{ client ->
client.connect(ip, port)
client.write(someBytes, flush=true)
client.read(expectedResponseLength)
}
Content copied to clipboard