1// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
2// file at the top-level directory of this distribution and at
3// http://rust-lang.org/COPYRIGHT.
4//
5// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8// option. This file may not be copied, modified, or distributed
9// except according to those terms.
10 11use prelude::*; 12use super::super::*; 13use super::super::support::PathLike; 14 15pubstruct UnixStream;
16 17impl UnixStream{ 18pubfn connect<P: PathLike>(_path: &P)->Option<UnixStream>{ 19fail2!() 20} 21} 22 23impl Reader for UnixStream{ 24fn read(&mut self,_buf: &mut [u8])->Option<uint>{fail2!()} 25 26fn eof(&mut self)->bool{fail2!()} 27} 28 29impl Writer for UnixStream{ 30fn write(&mut self,_v: &[u8]){fail2!()} 31 32fn flush(&mut self){fail2!()} 33} 34 35pubstruct UnixListener;
36 37impl UnixListener{ 38pubfn bind<P: PathLike>(_path: &P)->Option<UnixListener>{ 39fail2!() 40} 41} 42 43impl Listener<UnixStream,UnixAcceptor> for UnixListener{ 44fn listen(self)->Option<UnixAcceptor>{fail2!()} 45} 46 47pubstruct UnixAcceptor;
48 49impl Acceptor<UnixStream> for UnixAcceptor{ 50fn accept(&mut self)->Option<UnixStream>{fail2!()} 51}