| OLD | NEW |
| 1 // Copyright 2015 The LUCI Authors. All rights reserved. | 1 // Copyright 2015 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // +build darwin dragonfly freebsd linux netbsd openbsd | 5 // +build darwin dragonfly freebsd linux netbsd openbsd |
| 6 | 6 |
| 7 package main | 7 package main |
| 8 | 8 |
| 9 import ( | 9 import ( |
| 10 "errors" | 10 "errors" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 return value, nil | 41 return value, nil |
| 42 } | 42 } |
| 43 | 43 |
| 44 // Validates that the URI is correct for Windows. | 44 // Validates that the URI is correct for Windows. |
| 45 func (u streamServerURI) Validate() (err error) { | 45 func (u streamServerURI) Validate() (err error) { |
| 46 _, err = u.Parse() | 46 _, err = u.Parse() |
| 47 return | 47 return |
| 48 } | 48 } |
| 49 | 49 |
| 50 // Create a POSIX (UNIX named pipe) stream server | 50 // Create a POSIX (UNIX named pipe) stream server |
| 51 func createStreamServer(ctx context.Context, uri streamServerURI) streamserver.S
treamServer { | 51 func createStreamServer(ctx context.Context, uri streamServerURI) (streamserver.
StreamServer, error) { |
| 52 path, err := uri.Parse() | 52 path, err := uri.Parse() |
| 53 if err != nil { | 53 if err != nil { |
| 54 panic("Failed to parse stream server URI.") | 54 panic("Failed to parse stream server URI.") |
| 55 } | 55 } |
| 56 » return streamserver.NewNamedPipeServer(ctx, path) | 56 » return streamserver.NewUNIXDomainSocketServer(ctx, path) |
| 57 } | 57 } |
| OLD | NEW |