[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] Can the pipe be used in event_new function as file descriptor(evutil_socket_t) in windows?



sorry, I misread, you can create two socket to simulate socket pair on windows, for performance, use eventfd instead

2013/1/10 Nick Mathewson <nickm@xxxxxxxxxxxxx>
On Wed, Jan 9, 2013 at 2:09 PM, simon zhang <hapopen@xxxxxxxxx> wrote:
> I wanted some linux code work in the windows.This is a multi thread
> program.I hope that the parent thread and child thread to pass data through
> the pipe.
> But no file descriptor in windows.The CreatePipe function can creat a pipe
> with read HANDLE and write HANDLE.But libevent don't konw HANDLE.I can not
> use it in the event.
> What is good way?Can't the pipe be used?

Try evutil_socketpair().  On windows, Libevent currently only supports
sockets, not handles.
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.