aboutsummaryrefslogtreecommitdiff
path: root/tests/websockets_bi.c
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-01-05 12:15:05 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-01-05 12:15:05 -0800
commitd15a3b366c7ec8b0f2dfc44e7802d7cc3ebd8290 (patch)
tree9a63ae6f04db60ca6d06d4c9603bcc7c7c821fdd /tests/websockets_bi.c
parent814cd72af956fd215938e1d1bc8a9266339f63a4 (diff)
fix networking for both stream and dgram
Diffstat (limited to 'tests/websockets_bi.c')
-rw-r--r--tests/websockets_bi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/websockets_bi.c b/tests/websockets_bi.c
index 73d061d2..c2dbb7da 100644
--- a/tests/websockets_bi.c
+++ b/tests/websockets_bi.c
@@ -81,7 +81,11 @@ int main(void)
struct sockaddr_in stSockAddr;
int Res;
+#if !TEST_DGRAM
SocketFD = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
+#else
+ SocketFD = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
+#endif
if (-1 == SocketFD)
{