diff options
Diffstat (limited to 'core/network.c')
-rw-r--r-- | core/network.c | 46 |
1 files changed, 21 insertions, 25 deletions
diff --git a/core/network.c b/core/network.c index 05dc9962..5aa0d304 100644 --- a/core/network.c +++ b/core/network.c | |||
@@ -1,30 +1,28 @@ | |||
1 | /* network.h | 1 | /* network.h |
2 | * | 2 | * |
3 | * Functions for the core networking. | 3 | * Functions for the core networking. |
4 | * | 4 | * |
5 | 5 | * Copyright (C) 2013 Tox project All Rights Reserved. | |
6 | Copyright (C) 2013 Tox project All Rights Reserved. | 6 | * |
7 | 7 | * This file is part of Tox. | |
8 | This file is part of Tox. | 8 | * |
9 | 9 | * Tox is free software: you can redistribute it and/or modify | |
10 | Tox is free software: you can redistribute it and/or modify | 10 | * it under the terms of the GNU General Public License as published by |
11 | it under the terms of the GNU General Public License as published by | 11 | * the Free Software Foundation, either version 3 of the License, or |
12 | the Free Software Foundation, either version 3 of the License, or | 12 | * (at your option) any later version. |
13 | (at your option) any later version. | 13 | * |
14 | 14 | * Tox is distributed in the hope that it will be useful, | |
15 | Tox is distributed in the hope that it will be useful, | 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 17 | * GNU General Public License for more details. |
18 | GNU General Public License for more details. | 18 | * |
19 | 19 | * You should have received a copy of the GNU General Public License | |
20 | You should have received a copy of the GNU General Public License | 20 | * along with Tox. If not, see <http://www.gnu.org/licenses/>. |
21 | along with Tox. If not, see <http://www.gnu.org/licenses/>. | 21 | * |
22 | 22 | */ | |
23 | */ | ||
24 | 23 | ||
25 | #include "network.h" | 24 | #include "network.h" |
26 | 25 | ||
27 | |||
28 | /* returns current UNIX time in microseconds (us). */ | 26 | /* returns current UNIX time in microseconds (us). */ |
29 | uint64_t current_time() | 27 | uint64_t current_time() |
30 | { | 28 | { |
@@ -129,7 +127,6 @@ int init_networking(IP ip, uint16_t port) | |||
129 | return -1; | 127 | return -1; |
130 | #endif | 128 | #endif |
131 | 129 | ||
132 | |||
133 | /* Functions to increase the size of the send and receive UDP buffers | 130 | /* Functions to increase the size of the send and receive UDP buffers |
134 | NOTE: uncomment if necessary */ | 131 | NOTE: uncomment if necessary */ |
135 | /* | 132 | /* |
@@ -147,7 +144,6 @@ int init_networking(IP ip, uint16_t port) | |||
147 | /*Enable broadcast on socket*/ | 144 | /*Enable broadcast on socket*/ |
148 | int broadcast = 1; | 145 | int broadcast = 1; |
149 | setsockopt(sock, SOL_SOCKET, SO_BROADCAST, (char*)&broadcast, sizeof(broadcast)); | 146 | setsockopt(sock, SOL_SOCKET, SO_BROADCAST, (char*)&broadcast, sizeof(broadcast)); |
150 | |||
151 | 147 | ||
152 | /* Set socket nonblocking */ | 148 | /* Set socket nonblocking */ |
153 | #ifdef WIN32 | 149 | #ifdef WIN32 |