[src]

Struct rustuv::net::TcpWatcher

pub struct TcpWatcher {
    handle: *uv_tcp_t,
    stream: StreamWatcher,
    home: HomeHandle,
    // some fields omitted
}

TCP implementation

Fields

handle
stream
home

Methods

impl TcpWatcher

fn new(io: &mut UvIoFactory) -> TcpWatcher

fn connect(io: &mut UvIoFactory, address: SocketAddr) -> Result<TcpWatcher, UvError>

Trait Implementations

impl HomingIO for TcpWatcher

fn home<'r>(&'r mut self) -> &'r mut HomeHandle

fn go_to_IO_home(&mut self) -> uint

This function will move tasks to run on their home I/O scheduler. Note that this function does not pin the task to the I/O scheduler, but rather it simply moves it to running on the I/O scheduler.

fn fire_homing_missile(&mut self) -> HomingMissile

Fires a single homing missile, returning another missile targeted back at the original home of this task. In other words, this function will move the local task to its I/O scheduler and then return an RAII wrapper which will return the task home.

impl RtioSocket for TcpWatcher

fn socket_name(&mut self) -> Result<SocketAddr, IoError>

impl RtioTcpStream for TcpWatcher

fn read(&mut self, buf: &mut [u8]) -> Result<uint, IoError>

fn write(&mut self, buf: &[u8]) -> Result<(), IoError>

fn peer_name(&mut self) -> Result<SocketAddr, IoError>

fn control_congestion(&mut self) -> Result<(), IoError>

fn nodelay(&mut self) -> Result<(), IoError>

fn keepalive(&mut self, delay_in_seconds: uint) -> Result<(), IoError>

fn letdie(&mut self) -> Result<(), IoError>

fn clone(&self) -> ~RtioTcpStream<Send>

fn close_write(&mut self) -> Result<(), IoError>

impl UvHandle<uv_tcp_t> for TcpWatcher

fn uv_handle(&self) -> *uv_tcp_t

fn uv_loop(&self) -> Loop

fn alloc(_: Option<Self>, ty: uv_handle_type) -> *T

unsafe fn from_uv_handle<'a>(h: &'a *T) -> &'a mut Self

fn install(~self) -> ~Self

fn close_async_(&mut self)

fn close(&mut self)

impl Drop for TcpWatcher

fn drop(&mut self)