-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unix socket support #2
Comments
Just do it, Unix sockets support is required. Welcome! |
@tulayang Beautiful, will do! I've also been adding |
O, that would be great support! Could you provide a new overloaded version for |
Sounds good to me 😄 |
Any progress on this? |
@dustinlacewell Coincidentally, yes! https://github.com/girvo/dup/blob/docker-socket/docker_socket/docker_socket.nim I'm currently working on the TAR impl. again, which I expect to have completed shortly. Communication with Docker's API via the Unix socket works perfectly, though I had to write my own (slightly dodgy) HTTP parser for it, and it still needs What's left is making the socket non-blocking and wrapping it with |
So I've been working on this today, and have a query; I'm currently using the https://github.com/zielmicha/reactor.nim The Unix socket support is pretty excellent, whereas I'm going to write a few lower level primitives for standard |
Yes, I had seen To extend the http io of standlib is difficult. So I'm writting a similar lib named nimnode which refer to nodejs based on libuv. I hope that could provide an extensible var channel = new HttpChannel(8000, "127.0.0.1")
await channel.request("/logs/123")
await channel.writeHead(...)
await channel.writeChunck(...)
await channel.writeChunck(...)
await channel.writeEnd()
var headers = await channel.readerHead(...)
while true:
var n = await channel.readChunk(...)
# doTask(a data chunk)
if n = 0:
break
# A request done do something
# next request, keepalive supported
await channel.request("/users")
# ... You can try to write unix socket support for |
Nim recently merged a PR that adds Unix socket support, I've been working on my own Docker client for Nim using that but came across this repo. Mind if I write a PR to add support for Unix sockets for this? Would save me a metric tonne of work.
The text was updated successfully, but these errors were encountered: