Example #1
0
 public UnixSocketStream(PipeName pipeName, SocketUsage socketUsage)
     : base(
         Init(socketUsage, pipeName),
         FileAccess.ReadWrite,
         true)
 {
 }
Example #2
0
        static Socket Init(SocketUsage socketUsage, PipeName pipeName)
        {
            switch (socketUsage)
            {
            case SocketUsage.Client:
                return(Connect(pipeName, isBlocking: true));

            case SocketUsage.Host:
                return(Host(pipeName));

            default:
                throw new ArgumentException("socketUsage");
            }
        }