aboutsummaryrefslogtreecommitdiff
path: root/tests/websockets_bi_side.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_side.c
parent814cd72af956fd215938e1d1bc8a9266339f63a4 (diff)
fix networking for both stream and dgram
Diffstat (limited to 'tests/websockets_bi_side.c')
-rw-r--r--tests/websockets_bi_side.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/websockets_bi_side.c b/tests/websockets_bi_side.c
index c9c50618..12b790fd 100644
--- a/tests/websockets_bi_side.c
+++ b/tests/websockets_bi_side.c
@@ -18,7 +18,11 @@ int main(void)
{
struct sockaddr_in stSockAddr;
int Res;
+#if !TEST_DGRAM
int SocketFD = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
+#else
+ int SocketFD = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP);
+#endif
if (-1 == SocketFD)
{