blob: ca2b9b2262c02d6893a1e3074383dd4ed6e633df [file] [log] [blame]
Albert Strasheime480b812011-03-25 14:42:25 -04001// 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
5package net
6
Peter Mundy91bcdb62011-03-25 16:11:19 -04007import (
8 "os"
9 "syscall"
10)
11
Mikio Haraabccf6b2013-03-29 12:16:24 +090012// FileConn returns a copy of the network connection corresponding to
13// the open file f. It is the caller's responsibility to close f when
14// finished. Closing c does not affect f, and closing f does not
15// affect c.
Russ Coxeb692922011-11-01 22:05:34 -040016func FileConn(f *os.File) (c Conn, err error) {
Peter Mundy91bcdb62011-03-25 16:11:19 -040017 // TODO: Implement this
18 return nil, os.NewSyscallError("FileConn", syscall.EWINDOWS)
Albert Strasheime480b812011-03-25 14:42:25 -040019}
20
Mikio Haraabccf6b2013-03-29 12:16:24 +090021// FileListener returns a copy of the network listener corresponding
22// to the open file f. It is the caller's responsibility to close l
23// when finished. Closing l does not affect f, and closing f does not
24// affect l.
Russ Coxeb692922011-11-01 22:05:34 -040025func FileListener(f *os.File) (l Listener, err error) {
Peter Mundy91bcdb62011-03-25 16:11:19 -040026 // TODO: Implement this
27 return nil, os.NewSyscallError("FileListener", syscall.EWINDOWS)
Albert Strasheime480b812011-03-25 14:42:25 -040028}
29
Mikio Haraabccf6b2013-03-29 12:16:24 +090030// FilePacketConn returns a copy of the packet network connection
31// corresponding to the open file f. It is the caller's
32// responsibility to close f when finished. Closing c does not affect
33// f, and closing f does not affect c.
Russ Coxeb692922011-11-01 22:05:34 -040034func FilePacketConn(f *os.File) (c PacketConn, err error) {
Peter Mundy91bcdb62011-03-25 16:11:19 -040035 // TODO: Implement this
36 return nil, os.NewSyscallError("FilePacketConn", syscall.EWINDOWS)
Albert Strasheime480b812011-03-25 14:42:25 -040037}