Struct asio::StreamSocket [] [src]

pub struct StreamSocket<P> {
    // some fields omitted
}

Methods

impl<P: Protocol> StreamSocket<P>
[src]

fn new<T: IoObject>(io: &T, pro: P) -> Result<StreamSocket<P>>

fn at_mark(&self) -> Result<bool>

fn async_receive<F: Handler<usize>>(&self, buf: &mut [u8], flags: i32, handler: F)

fn async_send<F: Handler<usize>>(&self, buf: &[u8], flags: i32, handler: F)

fn available(&self) -> Result<usize>

fn bind(&self, ep: &P::Endpoint) -> Result<()>

fn cancel(&self)

fn get_non_blocking(&self) -> Result<bool>

fn get_option<C: GetSocketOption<P>>(&self) -> Result<C>

fn io_control<C: IoControl>(&self, cmd: &mut C) -> Result<()>

fn local_endpoint(&self) -> Result<P::Endpoint>

fn protocol(&self) -> &P

fn receive(&self, buf: &mut [u8], flags: i32) -> Result<usize>

fn remote_endpoint(&self) -> Result<P::Endpoint>

fn send(&self, buf: &[u8], flags: i32) -> Result<usize>

fn set_non_blocking(&self, on: bool) -> Result<()>

fn set_option<C: SetSocketOption<P>>(&self, cmd: C) -> Result<()>

fn shutdown(&self, how: Shutdown) -> Result<()>

Trait Implementations

impl<P: Protocol> Stream for StreamSocket<P>
[src]

fn async_read_some<F: Handler<usize>>(&self, buf: &mut [u8], handler: F)

fn async_write_some<F: Handler<usize>>(&self, buf: &[u8], handler: F)

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

fn write_some(&self, buf: &[u8]) -> Result<usize>

impl<P> IoObject for StreamSocket<P>
[src]

fn io_service(&self) -> &IoService

Returns a IoService associated with this object.

impl<P: Protocol> FromRawFd<P> for StreamSocket<P>
[src]

unsafe fn from_raw_fd<T: IoObject>(io: &T, pro: P, fd: RawFd) -> StreamSocket<P>

impl<P: Protocol> Connect<P> for StreamSocket<P>
[src]

fn async_connect<F: Handler<()>>(&self, ep: &P::Endpoint, handler: F)

fn connect(&self, ep: &P::Endpoint) -> Result<()>

impl<P> AsRawFd for StreamSocket<P>
[src]

fn as_raw_fd(&self) -> RawFd

Extracts the raw file descriptor. Read more