C# Class Tornado.iostream.IOStream

显示文件 Open project: swax/Tornado.Net Class Usage Examples

Public Properties

Property Type Description
error object
io_loop Tornado.ioloop.IOLoop
max_buffer_size int
read_chunk_size int
socket System.Net.Sockets.Socket

Public Methods

Method Description
IOStream ( Socket socket_, IOLoop io_loop_, int max_buffer_size_ = 104857600, int read_chunk_size_ = 4096 ) : System
_read_from_buffer ( ) : bool
_set_read_callback ( Action callback ) : void
_try_inline_read ( ) : void
close ( ) : void
closed ( ) : bool
read_bytes ( int num_bytes, Action callback, Action streaming_callback = null ) : void
read_until ( byte delimiter, Action callback ) : void
read_until_regex ( string regex, Action callback ) : void
reading ( ) : bool
set_close_callback ( System.Action callback ) : void
write ( byte data, System.Action callback = null ) : void
writing ( ) : bool

Private Methods

Method Description
_add_io_state ( int state ) : void
_check_closed ( ) : void
_consume ( int loc ) : byte[]
_double_prefix ( LinkedList deque ) : void
_handle_connect ( ) : void
_handle_events ( int fd, int events ) : void
_handle_read ( ) : void
_handle_write ( ) : void
_maybe_add_error_listener ( ) : void
_maybe_run_close_callback ( ) : void
_merge_prefix ( LinkedList deque, int size ) : void
_read_from_socket ( ) : byte[]
_read_to_buffer ( ) : int
_run_callback ( System.Action callback ) : void

Method Details

IOStream() public method

public IOStream ( Socket socket_, IOLoop io_loop_, int max_buffer_size_ = 104857600, int read_chunk_size_ = 4096 ) : System
socket_ System.Net.Sockets.Socket
io_loop_ Tornado.ioloop.IOLoop
max_buffer_size_ int
read_chunk_size_ int
return System

_read_from_buffer() public method

public _read_from_buffer ( ) : bool
return bool

_set_read_callback() public method

public _set_read_callback ( Action callback ) : void
callback Action
return void

_try_inline_read() public method

public _try_inline_read ( ) : void
return void

close() public method

public close ( ) : void
return void

closed() public method

public closed ( ) : bool
return bool

read_bytes() public method

public read_bytes ( int num_bytes, Action callback, Action streaming_callback = null ) : void
num_bytes int
callback Action
streaming_callback Action
return void

read_until() public method

public read_until ( byte delimiter, Action callback ) : void
delimiter byte
callback Action
return void

read_until_regex() public method

public read_until_regex ( string regex, Action callback ) : void
regex string
callback Action
return void

reading() public method

public reading ( ) : bool
return bool

set_close_callback() public method

public set_close_callback ( System.Action callback ) : void
callback System.Action
return void

write() public method

public write ( byte data, System.Action callback = null ) : void
data byte
callback System.Action
return void

writing() public method

public writing ( ) : bool
return bool

Property Details

error public_oe property

public object error
return object

io_loop public_oe property

public IOLoop,Tornado.ioloop io_loop
return Tornado.ioloop.IOLoop

max_buffer_size public_oe property

public int max_buffer_size
return int

read_chunk_size public_oe property

public int read_chunk_size
return int

socket public_oe property

public Socket,System.Net.Sockets socket
return System.Net.Sockets.Socket