Skip to content
This repository has been archived by the owner on Nov 28, 2019. It is now read-only.

High level API for Socket Client #45

Closed
wants to merge 3 commits into from

Conversation

ghostdogpr
Copy link

This is an example of what I was suggesting in #42 : a simpler wrapper on top of our NIO wrapper to expose features in an easy way for users of the library.

I took the example of the socket client, which can be simply used like this:

SocketClient(address).use { client =>
  for {
  _        <- client.write(Array(0, 1, 2))
  received <- client.read(3)
  } yield received
}

What do you think about offering something like that?

@jdegoes
Copy link
Member

jdegoes commented Feb 7, 2019

@ghostdogpr This is conflicting. I love the idea, I think we should use Managed to make things simpler. However, I will close this until conflicts are resolved.

@jdegoes jdegoes closed this Feb 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants