Package pyrobot :: Package system :: Module ClientServer :: Class Client
[frames | no frames]

Class Client


Client Class

Method Summary
  __init__(self, host, port)
Init the class - define socket type...
  close(self)
Close connection...
  connect(self)
Connect to server - already defined in init...
  disconnect(self)
just call self.close()...
  init_server(self)
This function will send a verification message to test if...
  listenString(self, times)
unlimited receive...
  receive(self)
Rewceives a string, unpickle it, then returns the Message object...
  receiveString(self)
receive from server...
  send(self, smsg)
Pickles a Message obj, and sends it...
  sendString(self, message)
sends message to open socket...
  terminal(self)
will send user command, then listen to server once...
  usersend(self)
will send whatever the user types - every line...

Method Details

__init__(self, host='localhost', port=1408)
(Constructor)

Init the class - define socket type

close(self)

Close connection

connect(self)

Connect to server - already defined in init

disconnect(self)

just call self.close()

init_server(self)

This function will send a verification message to test if
client is connected to a SimServer or some other one!
It will raise an exception if it was wrong

listenString(self, times=-1)

unlimited receive

receive(self)

Rewceives a string, unpickle it, then returns the Message object

receiveString(self)

receive from server

send(self, smsg)

Pickles a Message obj, and sends it

sendString(self, message)

sends message to open socket

terminal(self)

will send user command, then listen to server once

usersend(self)

will send whatever the user types - every line

Generated by Epydoc 2.1 on Mon Jul 25 01:39:27 2005 http://epydoc.sf.net