- Timestamp:
- 12/11/07 03:28:39 (13 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/follower/wiz810mj/src/demo/WizDemo4/WizDemo4.pde
r109 r110 218 218 /* ---- NetworkConnection ---- */ 219 219 220 221 220 // TODO: Make this 'NetworkServerConnection'? Or just 'ServerConnection'? 222 221 // TODO: Pull one-line methods into class definition to allow inlining? … … 283 282 284 283 /* -- NetworkInterface -- */ 284 285 #define HANDLE_BAD_ERROR() while (1) {}; 285 286 286 287 // TODO?: Do we want to have a "default" socket accessible by 'Network.read()' etc? … … 335 336 NetworkConnection connection = NetworkConnection(port); 336 337 337 connection.listen(); 338 // TODO: How to best handle errors? 339 // There's two major categories I can think of currently: 340 // 1) A socket wasn't available to listen in the first place 341 // 2) The listen attempt failed for some reason 342 // Using 'HANDLE_BAD_ERROR()' (currently an infinite loop) is 343 // not ideal but should prevent the above errors slipping by unnoticed. 344 if (!connection.listen()) { 345 HANDLE_BAD_ERROR(); 346 } 338 347 339 348 return connection;