Struct asio::StreamSocket [] [src]

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

Provides stream-oriented socket functionality.

Methods

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

fn async_connect<F, T>(&self, ep: &P::Endpoint, callback: F, strand: &Strand<T>) where F: FnOnce(Strand<T>, Result<()>) + Send + 'static, T: 'static

fn async_read_some<B, F, T>(&self, buf: B, callback: F, strand: &Strand<T>) where B: FnOnce(&mut T) -> &mut [u8] + Send + 'static, F: FnOnce(Strand<T>, Result<usize>) + Send + 'static, T: 'static

fn async_receive<B, F, T>(&self, buf: B, flags: i32, callback: F, strand: &Strand<T>) where B: FnOnce(&mut T) -> &mut [u8] + Send + 'static, F: FnOnce(Strand<T>, Result<usize>) + Send + 'static, T: 'static

fn async_send<B, F, T>(&self, buf: B, flags: i32, callback: F, strand: &Strand<T>) where B: FnOnce(&T) -> &[u8] + Send + 'static, F: FnOnce(Strand<T>, Result<usize>) + Send + 'static, T: 'static

fn async_write_some<B, F, T>(&self, buf: B, callback: F, strand: &Strand<T>) where B: FnOnce(&T) -> &[u8] + Send + 'static, F: FnOnce(Strand<T>, Result<usize>) + Send + 'static, T: 'static

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

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

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

fn cancel(&self)

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

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

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

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

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

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_option<T: SetSocketOption<P>>(&self, cmd: T) -> Result<()>

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

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

impl StreamSocket<LocalStream>
[src]

impl StreamSocket<Tcp>
[src]

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

Trait Implementations

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

fn io_service(&self) -> &IoService

Returns a IoService associated with this object.

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

fn get_non_blocking(&self) -> bool

fn set_non_blocking(&self, on: bool)

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

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

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

fn as_raw_fd(&self) -> RawFd

Extracts the raw file descriptor. Read more

impl Debug for StreamSocket<Tcp>
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.