server_windows.go 682 B

12345678910111213141516171819202122232425262728293031
  1. // +build windows
  2. package server
  3. import (
  4. "fmt"
  5. "github.com/docker/docker/engine"
  6. )
  7. // NewServer sets up the required Server and does protocol specific checking.
  8. func NewServer(proto, addr string, job *engine.Job) (Server, error) {
  9. // Basic error and sanity checking
  10. switch proto {
  11. case "tcp":
  12. return setupTcpHttp(addr, job)
  13. default:
  14. return nil, errors.New("Invalid protocol format. Windows only supports tcp.")
  15. }
  16. }
  17. // Called through eng.Job("acceptconnections")
  18. func AcceptConnections(job *engine.Job) engine.Status {
  19. // close the lock so the listeners start accepting connections
  20. if activationLock != nil {
  21. close(activationLock)
  22. }
  23. return engine.StatusOK
  24. }