Added function-like macro for struct netconn::non_blocking

This commit is contained in:
goldsimon
2010-01-29 22:21:45 +00:00
parent e58f4c567a
commit c70c3eac62
2 changed files with 16 additions and 9 deletions

View File

@@ -221,8 +221,13 @@ err_t netconn_join_leave_group(struct netconn *conn, struct ip_addr *multiaddr
err_t netconn_gethostbyname(const char *name, struct ip_addr *addr);
#endif /* LWIP_DNS */
#define netconn_err(conn) ((conn)->last_err)
#define netconn_recv_bufsize(conn) ((conn)->recv_bufsize)
#define netconn_err(conn) ((conn)->last_err)
#define netconn_recv_bufsize(conn) ((conn)->recv_bufsize)
/** Set the blocking status of netconn calls (@todo: write/send is missing) */
#define netconn_set_nonblocking(conn, val) ((conn)->non_blocking = (val))
/** Get the blocking status of netconn calls (@todo: write/send is missing) */
#define netconn_is_nonblocking(conn) ((conn)->non_blocking)
#ifdef __cplusplus
}