You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2023/01/16 18:03:53 UTC

[GitHub] [nuttx] acassis commented on a diff in pull request #8156: network minor improvement

acassis commented on code in PR #8156:
URL: https://github.com/apache/nuttx/pull/8156#discussion_r1071486738


##########
include/nuttx/net/net.h:
##########
@@ -118,13 +118,9 @@ enum net_lltype_e
 
 typedef uint16_t sockopt_t;
 
-/* This defines the storage size of a timeout value.  This effects only
- * range of supported timeout values.  With an LSB in seciseconds, the
- * 16-bit maximum of 65535 corresponds to 1 hr 49 min 13.5 sec at decisecond
- * resolution.
- */
+/* This defines the storage size of a timeout value (seciseconds) */
 
-typedef uint16_t socktimeo_t;
+typedef int32_t socktimeo_t;

Review Comment:
   @xiaoxiang781216 is there some pragmatic application of it? Is it possible in the real word a socket delay for more than 1 hr 49 min 13.5 sec ? :-)
   Maybe a better option should change the resolution to accept milliseconds or even microseconds timeout value, so in this case been int32_t will make it possible to have a larger range of timeout values 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org