Esempio n. 1
0
 static DomainSocket()
 {
     inputStream  = new DomainSocket.DomainInputStream(this);
     outputStream = new DomainSocket.DomainOutputStream(this);
     channel      = new DomainSocket.DomainChannel(this);
     if (SystemUtils.IsOsWindows)
     {
         loadingFailureReason = "UNIX Domain sockets are not available on Windows.";
     }
     else
     {
         if (!NativeCodeLoader.IsNativeCodeLoaded())
         {
             loadingFailureReason = "libhadoop cannot be loaded.";
         }
         else
         {
             string problem;
             try
             {
                 AnchorNative();
                 problem = null;
             }
             catch (Exception t)
             {
                 problem = "DomainSocket#anchorNative got error: " + t.Message;
             }
             loadingFailureReason = problem;
         }
     }
 }
Esempio n. 2
0
 private DomainSocket(string path, int fd)
 {
     inputStream   = new DomainSocket.DomainInputStream(this);
     outputStream  = new DomainSocket.DomainOutputStream(this);
     channel       = new DomainSocket.DomainChannel(this);
     this.refCount = new CloseableReferenceCount();
     this.fd       = fd;
     this.path     = path;
 }
Esempio n. 3
0
 /// <exception cref="System.IO.IOException"/>
 public override void Init(DomainSocket s)
 {
     ch = s.GetChannel();
 }