Changeset 104 for branches

Show
Ignore:
Timestamp:
12/11/07 02:41:31 (13 months ago)
Author:
follower
Message:

Add method to close socket. NOTE: This change BREAKS THINGS and the demo NO LONGER FUNCTIONS. The problem is however unrelated to the commit--this code simply reveals an already existing bug due to the socket number being uninitialised. Now I've found out why the problem occurs I can fix it in the next commit.

Files:
1 modified

Legend:

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

    r103 r104  
    229229 
    230230    int isConnected(); 
     231    void NetworkConnection::close(); 
    231232 
    232233  private: 
     
    237238  /* 
    238239 
    239    */   
     240   */ 
    240241  socket(_socket, Sn_MR_TCP, port, 0); 
    241242} 
     
    256257 return (getSn_SR(_socket) == SOCK_ESTABLISHED); 
    257258 
     259 
     260void NetworkConnection::close() { 
     261  /* 
     262 
     263   */   
     264  ::close(_socket); 
     265  disconnect(_socket); 
     266} 
     267 
    258268 
    259269/* ----------------------- */