file_windows.go 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Copyright 2011 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. package net
  5. import (
  6. "os"
  7. "syscall"
  8. )
  9. // FileConn returns a copy of the network connection corresponding to
  10. // the open file f. It is the caller's responsibility to close f when
  11. // finished. Closing c does not affect f, and closing f does not
  12. // affect c.
  13. func FileConn(f *os.File) (c Conn, err error) {
  14. // TODO: Implement this
  15. return nil, os.NewSyscallError("FileConn", syscall.EWINDOWS)
  16. }
  17. // FileListener returns a copy of the network listener corresponding
  18. // to the open file f. It is the caller's responsibility to close l
  19. // when finished. Closing l does not affect f, and closing f does not
  20. // affect l.
  21. func FileListener(f *os.File) (l Listener, err error) {
  22. // TODO: Implement this
  23. return nil, os.NewSyscallError("FileListener", syscall.EWINDOWS)
  24. }
  25. // FilePacketConn returns a copy of the packet network connection
  26. // corresponding to the open file f. It is the caller's
  27. // responsibility to close f when finished. Closing c does not affect
  28. // f, and closing f does not affect c.
  29. func FilePacketConn(f *os.File) (c PacketConn, err error) {
  30. // TODO: Implement this
  31. return nil, os.NewSyscallError("FilePacketConn", syscall.EWINDOWS)
  32. }