github.com/razvanm/vanadium-go-1.3@v0.0.0-20160721203343-4a65068e5915/src/net/file_stub.go (about)

     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  
     5  // +build nacl
     6  
     7  package net
     8  
     9  import (
    10  	"os"
    11  	"syscall"
    12  )
    13  
    14  // FileConn returns a copy of the network connection corresponding to
    15  // the open file f.  It is the caller's responsibility to close f when
    16  // finished.  Closing c does not affect f, and closing f does not
    17  // affect c.
    18  func FileConn(f *os.File) (c Conn, err error) {
    19  	return nil, syscall.ENOPROTOOPT
    20  
    21  }
    22  
    23  // FileListener returns a copy of the network listener corresponding
    24  // to the open file f.  It is the caller's responsibility to close l
    25  // when finished.  Closing l does not affect f, and closing f does not
    26  // affect l.
    27  func FileListener(f *os.File) (l Listener, err error) {
    28  	return nil, syscall.ENOPROTOOPT
    29  
    30  }
    31  
    32  // FilePacketConn returns a copy of the packet network connection
    33  // corresponding to the open file f.  It is the caller's
    34  // responsibility to close f when finished.  Closing c does not affect
    35  // f, and closing f does not affect c.
    36  func FilePacketConn(f *os.File) (c PacketConn, err error) {
    37  	return nil, syscall.ENOPROTOOPT
    38  }