socket: add support for blocking sockets

Add a flag to open a blocking socket. The default stays non-blocking.
This commit is contained in:
Miroslav Lichvar
2019-11-18 18:07:16 +01:00
parent e7fc2d31cc
commit 0dba2b9689
2 changed files with 46 additions and 21 deletions

View File

@@ -31,6 +31,7 @@
#include "addressing.h"
/* Flags for opening sockets */
#define SCK_FLAG_BLOCK 1
#define SCK_FLAG_BROADCAST 2
#define SCK_FLAG_RX_DEST_ADDR 4
#define SCK_FLAG_ALL_PERMISSIONS 8