On Tue, 04 Feb 2014 10:32:39 +0100, Sönke Ludwig wrote:
Am 04.02.2014 09:40, schrieb Damian Ziemba:
Hello.
I need help to get some basic things running up.
I would like to fire an event when data for read is available on file descriptor.
Something like this in C code:
event_new(event_base_new(), fd, EV_READ|EV_PERSIST, my_callback, obj);but Vibed way. How can I achive that?
On GIT master, there is a generic
createFileDescriptorEvent()function
invibe.core.corethat achieves this.
Hmm, is there any example how can I use it?
For example to print hello world on stdout when data for read is available?
Another thing I would like to listen on unix socket instead of IP address. How can I do it?
Can I do something likelistenTCP(0, callback, "/tmp/my.sock", options);?
There is currently no direct support for UNIX sockets, so the usual BSD
socket calls need to be used manually in conjunction with theFileDescriptorEvent. Dedicated support would be nice to have, but
unfortunately I'm currently lacking the time to implement them.
Roger that, I will try to help with that