Пример #1
0
            public override void Run()
            {
                DomainSocket conn = null;

                try
                {
                    conn = serv.Accept();
                    byte[]      in1             = new byte[clientMsg1.Length];
                    InputStream connInputStream = conn.GetInputStream();
                    IOUtils.ReadFully(connInputStream, in1, 0, in1.Length);
                    Assert.True(Arrays.Equals(clientMsg1, in1));
                    DomainSocket domainConn = (DomainSocket)conn;
                    domainConn.SendFileDescriptors(passedFds, serverMsg1, 0, serverMsg1.Length);
                    conn.Close();
                }
                catch (System.Exception e)
                {
                    threadResults.AddItem(e);
                    NUnit.Framework.Assert.Fail(e.Message);
                }
                threadResults.AddItem(new TestDomainSocket.Success());
            }