Peach :: Publishers :: raw :: Raw :: Class Raw
[hide private]

Class Raw

source code


A simple Raw publisher.

Instance Methods [hide private]
 
__init__(self, interface, timeout=0.1) source code
 
start(self)
Create connection.
source code
 
stop(self)
Close connection if open.
source code
 
connect(self) source code
 
close(self)
Close current stream/connection.
source code
 
send(self, data)
Send data via sendall.
source code
string
receive(self, size=None)
Receive upto 10000 bytes of data.
source code

Inherited from publisher.Publisher: accept, call, property

Class Variables [hide private]
  _host = None
  _socket = None
Method Details [hide private]

__init__(self, interface, timeout=0.1)
(Constructor)

source code 
Parameters:
  • host (string) - Remote host
  • timeout (number) - How long to wait for reponse

start(self)

source code 

Create connection.

Overrides: publisher.Publisher.start

stop(self)

source code 

Close connection if open.

Overrides: publisher.Publisher.stop

close(self)

source code 

Close current stream/connection.

Overrides: publisher.Publisher.close
(inherited documentation)

send(self, data)

source code 

Send data via sendall.

Parameters:
  • data (string) - Data to send
Overrides: publisher.Publisher.send

receive(self, size=None)

source code 

Receive upto 10000 bytes of data.

Parameters:
  • size - Number of bytes to return
Returns: string
received data.
Overrides: publisher.Publisher.receive