2013-04-17 17:55:21 -07:00
|
|
|
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
|
|
|
|
// file at the top-level directory of this distribution and at
|
|
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
|
|
|
use prelude::*;
|
|
|
|
use super::super::*;
|
2013-04-19 15:18:38 -07:00
|
|
|
use super::super::support::PathLike;
|
2013-04-17 17:55:21 -07:00
|
|
|
|
|
|
|
pub struct UnixStream;
|
|
|
|
|
|
|
|
impl UnixStream {
|
2013-04-22 13:10:59 -07:00
|
|
|
pub fn connect<P: PathLike>(_path: &P) -> Option<UnixStream> {
|
2013-10-21 13:08:31 -07:00
|
|
|
fail!()
|
2013-04-17 17:55:21 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Reader for UnixStream {
|
2013-10-21 13:08:31 -07:00
|
|
|
fn read(&mut self, _buf: &mut [u8]) -> Option<uint> { fail!() }
|
2013-04-17 17:55:21 -07:00
|
|
|
|
2013-10-21 13:08:31 -07:00
|
|
|
fn eof(&mut self) -> bool { fail!() }
|
2013-04-17 17:55:21 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
impl Writer for UnixStream {
|
2013-10-21 13:08:31 -07:00
|
|
|
fn write(&mut self, _v: &[u8]) { fail!() }
|
2013-04-17 17:55:21 -07:00
|
|
|
|
2013-10-21 13:08:31 -07:00
|
|
|
fn flush(&mut self) { fail!() }
|
2013-04-17 17:55:21 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
pub struct UnixListener;
|
|
|
|
|
|
|
|
impl UnixListener {
|
2013-04-22 13:10:59 -07:00
|
|
|
pub fn bind<P: PathLike>(_path: &P) -> Option<UnixListener> {
|
2013-10-21 13:08:31 -07:00
|
|
|
fail!()
|
2013-04-17 17:55:21 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-08-27 10:01:17 -07:00
|
|
|
impl Listener<UnixStream, UnixAcceptor> for UnixListener {
|
2013-10-21 13:08:31 -07:00
|
|
|
fn listen(self) -> Option<UnixAcceptor> { fail!() }
|
2013-08-27 10:01:17 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
pub struct UnixAcceptor;
|
|
|
|
|
|
|
|
impl Acceptor<UnixStream> for UnixAcceptor {
|
2013-10-21 13:08:31 -07:00
|
|
|
fn accept(&mut self) -> Option<UnixStream> { fail!() }
|
2013-04-17 17:55:21 -07:00
|
|
|
}
|