예제 #1
0
        public static bool DNSServiceHasData(IntPtr handle, TimeSpan?waitFor)
        {
            var sock = DNSServiceRefSockFD(handle);

            var read  = new FdSet(sock);
            var error = new FdSet(sock);
            var tv    = (waitFor.HasValue) ? new TimeVal(waitFor.Value) : null;

            var r = select(1, read, null, error, tv);

            return(r > 0);
        }
예제 #2
0
        public static bool DNSServiceHasData(IntPtr handle, TimeSpan? waitFor)
        {
            var sock = DNSServiceRefSockFD(handle);

            var read = new FdSet(sock);
            var error = new FdSet(sock);
            var tv = (waitFor.HasValue) ? new TimeVal(waitFor.Value) : null;

            var r = select(1, read, null, error, tv);

            return (r > 0);
        }
예제 #3
0
 private static extern int select(int nsock, [In, Out] FdSet read, [In, Out] FdSet write, [In, Out] FdSet error, TimeVal tv);