"""
<Purpose>
  Placeholder for testing objects which use TcpStateMachine.
"""

class TcpStateMachine:
  """
  <Purpose>
    Do nothing.  Used to be able to tests Connection() which
    uses a state machine but ignore state machine bugs.  We
    will know the Connection object is the bug source.
    
  <Example Use>
    include state_machine.repy
    include dummy_state_machine.repy # overwrite definition
    sm = TcpStateMachine()
    sm.<any_function>(<any_args>) # ignore
    # ...
  """
  
  def __init__(*args): pass
  def next(*args): pass
  def listen(*args): return None
  def connect(*args): pass
  def accept(*args): pass
  def send(*args): return 10
  def recv(*args): return "hi"
  def close(*args): pass
  def timeout_close(*args): pass
  def time_waiting(*args): pass

class TcpClient:
  """
  <Purpose>
    Do nothing.  Used to be able to tests Connection() which
    uses a server but ignore server bugs.  We
    will know the Connection object is the bug source.
    
  <Example Use>
    include server.repy
    include dummies.repy # overwrite definition
    serv = TcpServer()
    serv.<any_function>(<any_args>) # ignore
    # ...
  """
  
  def __init__(*args): pass
  def send(*args): return 1
  def process(*args): pass
  def accept(*args): pass
  def connect(*args): pass
  def set_recv_window(*args): pass
  def close(*args): pass

class TcpServer:
  """
  <Purpose>
    Do nothing.  Used to be able to tests Connection() which
    uses a server but ignore server bugs.  We
    will know the Connection object is the bug source.
    
  <Example Use>
    include server.repy
    include dummies.repy # overwrite definition
    serv = TcpServer()
    serv.<any_function>(<any_args>) # ignore
    # ...
  """
  
  def __init__(*args): pass
  def recv(*args): return "hiya"
  def process(*args): pass
  def listen(*args): return (IP, PORT)
  def get_recv_window(*args): pass
  def get_ack_num(*args): pass
