fiatjaf / sn-unixsocket   0.2.0

GitHub

Simple and naïve library that can read and write from and to a Unix domain socket using libuv.

Scala versions: 3.x
Scala Native versions: 0.4

unixsocket

This uses libuv to write strings to a UNIX domain socket and read responses back as strings.

Installation

libraryDependencies += "com.fiatjaf" %%% "sn-unixsocket" % "0.1.0"

Simple usage

import unixsocket.UnixSocket

UnixSocket
  .call(socketPath, payload)
  .future
  .onComplete {
    case Success(str) => println(s"got response from socket: $str")
    case Failure(exc) => println("oh no!")
  }