Changeset 102 for branches

Show
Ignore:
Timestamp:
12/10/07 04:31:19 (13 months ago)
Author:
follower
Message:

Add 'isConnected' method to 'NetworkConnection?' in prepartion for use.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/follower/wiz810mj/src/demo/WizDemo4/WizDemo4.pde

    r101 r102  
    220220 
    221221// TODO: Make this 'NetworkServerConnection'? Or just 'ServerConnection'? 
     222// TODO: Pull one-line methods into class definition to allow inlining? 
    222223class NetworkConnection { // Essentially a Socket wrapper 
    223224 
     
    226227 
    227228    void listen(); // TODO: Return a useful value? 
     229 
     230    int isConnected(); 
    228231 
    229232  private: 
     
    244247  ::listen(_socket); // TODO: Use C++ namespaces for the driver functions? 
    245248} 
     249 
     250int NetworkConnection::isConnected() { 
     251  /* 
     252 
     253   */ 
     254 // TODO: If we want the 'Network*' classes to be generic we 
     255 //       would need to handle this differently: 
     256 return (getSn_SR(_socket) == SOCK_ESTABLISHED); 
     257 
    246258 
    247259/* ----------------------- */