1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/api/server/server_windows.go
John Howard (VM) 081c6c76e2 Factor out ServeFD & systemd in server for Linux only (Not Windows)
Signed-off-by: John Howard <John.Howard@microsoft.com>
2015-03-10 15:06:16 -07:00

31 lines
682 B
Go

// +build windows
package server
import (
"fmt"
"github.com/docker/docker/engine"
)
// NewServer sets up the required Server and does protocol specific checking.
func NewServer(proto, addr string, job *engine.Job) (Server, error) {
// Basic error and sanity checking
switch proto {
case "tcp":
return setupTcpHttp(addr, job)
default:
return nil, errors.New("Invalid protocol format. Windows only supports tcp.")
}
}
// Called through eng.Job("acceptconnections")
func AcceptConnections(job *engine.Job) engine.Status {
// close the lock so the listeners start accepting connections
if activationLock != nil {
close(activationLock)
}
return engine.StatusOK
}