diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/DHT.c | 20 | ||||
-rw-r--r-- | core/DHT.h | 18 | ||||
-rw-r--r-- | core/network.c | 24 | ||||
-rw-r--r-- | core/network.h | 18 |
4 files changed, 79 insertions, 1 deletions
@@ -2,9 +2,29 @@ | |||
2 | * | 2 | * |
3 | * An implementation of the DHT as seen in docs/DHT.txt | 3 | * An implementation of the DHT as seen in docs/DHT.txt |
4 | * | 4 | * |
5 | |||
6 | Copyright (C) 2013 Tox project All Rights Reserved. | ||
7 | |||
8 | This file is part of Tox. | ||
9 | |||
10 | Tox is free software: you can redistribute it and/or modify | ||
11 | it under the terms of the GNU General Public License as published by | ||
12 | the Free Software Foundation, either version 3 of the License, or | ||
13 | (at your option) any later version. | ||
14 | |||
15 | Tox is distributed in the hope that it will be useful, | ||
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | GNU General Public License for more details. | ||
19 | |||
20 | You should have received a copy of the GNU General Public License | ||
21 | along with Tox. If not, see <http://www.gnu.org/licenses/>. | ||
22 | |||
5 | */ | 23 | */ |
6 | 24 | ||
7 | 25 | ||
26 | |||
27 | |||
8 | #include "DHT.h" | 28 | #include "DHT.h" |
9 | 29 | ||
10 | char self_client_id[CLIENT_ID_SIZE]; | 30 | char self_client_id[CLIENT_ID_SIZE]; |
@@ -2,6 +2,24 @@ | |||
2 | * | 2 | * |
3 | * An implementation of the DHT as seen in docs/DHT.txt | 3 | * An implementation of the DHT as seen in docs/DHT.txt |
4 | * | 4 | * |
5 | |||
6 | Copyright (C) 2013 Tox project All Rights Reserved. | ||
7 | |||
8 | This file is part of Tox. | ||
9 | |||
10 | Tox is free software: you can redistribute it and/or modify | ||
11 | it under the terms of the GNU General Public License as published by | ||
12 | the Free Software Foundation, either version 3 of the License, or | ||
13 | (at your option) any later version. | ||
14 | |||
15 | Tox is distributed in the hope that it will be useful, | ||
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | GNU General Public License for more details. | ||
19 | |||
20 | You should have received a copy of the GNU General Public License | ||
21 | along with Tox. If not, see <http://www.gnu.org/licenses/>. | ||
22 | |||
5 | */ | 23 | */ |
6 | 24 | ||
7 | 25 | ||
diff --git a/core/network.c b/core/network.c index 9434f6fb..43168da4 100644 --- a/core/network.c +++ b/core/network.c | |||
@@ -1,4 +1,26 @@ | |||
1 | /* network.h | ||
2 | * | ||
3 | * Functions for the core networking. | ||
4 | * | ||
5 | |||
6 | Copyright (C) 2013 Tox project All Rights Reserved. | ||
1 | 7 | ||
8 | This file is part of Tox. | ||
9 | |||
10 | Tox is free software: you can redistribute it and/or modify | ||
11 | it under the terms of the GNU General Public License as published by | ||
12 | the Free Software Foundation, either version 3 of the License, or | ||
13 | (at your option) any later version. | ||
14 | |||
15 | Tox is distributed in the hope that it will be useful, | ||
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | GNU General Public License for more details. | ||
19 | |||
20 | You should have received a copy of the GNU General Public License | ||
21 | along with Tox. If not, see <http://www.gnu.org/licenses/>. | ||
22 | |||
23 | */ | ||
2 | 24 | ||
3 | #include "network.h" | 25 | #include "network.h" |
4 | 26 | ||
@@ -57,7 +79,7 @@ int init_networking(IP ip ,uint16_t port) | |||
57 | sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); | 79 | sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); |
58 | 80 | ||
59 | //Functions to increase the size of the send and recieve UDP buffers | 81 | //Functions to increase the size of the send and recieve UDP buffers |
60 | //NOTE: uncomment if necessary. | 82 | //NOTE: uncomment if nn |
61 | /* | 83 | /* |
62 | int n = 1024 * 1024 * 2; | 84 | int n = 1024 * 1024 * 2; |
63 | if(setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (char*)&n, sizeof(n)) == -1) | 85 | if(setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (char*)&n, sizeof(n)) == -1) |
diff --git a/core/network.h b/core/network.h index 17b29f2c..b4f374d8 100644 --- a/core/network.h +++ b/core/network.h | |||
@@ -2,6 +2,24 @@ | |||
2 | * | 2 | * |
3 | * Datatypes, functions and includes for the core networking. | 3 | * Datatypes, functions and includes for the core networking. |
4 | * | 4 | * |
5 | |||
6 | Copyright (C) 2013 Tox project All Rights Reserved. | ||
7 | |||
8 | This file is part of Tox. | ||
9 | |||
10 | Tox is free software: you can redistribute it and/or modify | ||
11 | it under the terms of the GNU General Public License as published by | ||
12 | the Free Software Foundation, either version 3 of the License, or | ||
13 | (at your option) any later version. | ||
14 | |||
15 | Tox is distributed in the hope that it will be useful, | ||
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | GNU General Public License for more details. | ||
19 | |||
20 | You should have received a copy of the GNU General Public License | ||
21 | along with Tox. If not, see <http://www.gnu.org/licenses/>. | ||
22 | |||
5 | */ | 23 | */ |
6 | 24 | ||
7 | 25 | ||