Skip to content

Commit

Permalink
doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
thefab committed Jun 22, 2015
1 parent 87b6143 commit 20ca57b
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions tornadis/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,7 @@


class Connection(object):
"""Low level connection object.
Attributes:
read_callback: callback called when there is something to read.
close_callback: callback called when the connection is closed.
host (string): the host name to connect to.
port (int): the port to connect to.
unix_domain_socket (string): path to a unix socket to connect to
(if set, overrides host/port parameters).
read_page_size (int): page size for reading.
write_page_size (int): page size for writing.
connect_timeout (int): timeout (in seconds) for connecting.
tcp_nodelay (boolean): set TCP_NODELAY on socket.
aggressive_write (boolean): try to minimize write latency over
global throughput (default False).
"""
"""Low level connection object."""

def __init__(self, read_callback, close_callback,
host=tornadis.DEFAULT_HOST,
Expand All @@ -61,6 +46,23 @@ def __init__(self, read_callback, close_callback,
write_page_size=tornadis.DEFAULT_WRITE_PAGE_SIZE,
connect_timeout=tornadis.DEFAULT_CONNECT_TIMEOUT,
tcp_nodelay=False, aggressive_write=False, ioloop=None):
"""Constructor.
Args:
read_callback: callback called when there is something to read.
close_callback: callback called when the connection is closed.
host (string): the host name to connect to.
port (int): the port to connect to.
unix_domain_socket (string): path to a unix socket to connect to
(if set, overrides host/port parameters).
read_page_size (int): page size for reading.
write_page_size (int): page size for writing.
connect_timeout (int): timeout (in seconds) for connecting.
tcp_nodelay (boolean): set TCP_NODELAY on socket.
aggressive_write (boolean): try to minimize write latency over
global throughput (default False).
ioloop (IOLoop): the tornado ioloop to use.
"""
self.host = host
self.port = port
self.unix_domain_socket = unix_domain_socket
Expand Down

0 comments on commit 20ca57b

Please sign in to comment.