| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 package streamserver |
| 6 |
| 7 import ( |
| 8 "net" |
| 9 |
| 10 log "github.com/luci/luci-go/common/logging" |
| 11 "golang.org/x/net/context" |
| 12 npipe "gopkg.in/natefinch/npipe.v2" |
| 13 ) |
| 14 |
| 15 // NewNamedPipeServer instantiates a new Windows named pipe server instance. |
| 16 func NewNamedPipeServer(ctx context.Context, address string) StreamServer { |
| 17 ctx = log.SetField(ctx, "address", address) |
| 18 return createNamedPipeServer(ctx, func() (net.Listener, error) { |
| 19 log.Debugf(ctx, "Creating Windows server socket Listener.") |
| 20 return npipe.Listen(address) |
| 21 }) |
| 22 } |
| OLD | NEW |