summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-06-28 09:15:19 -0400
committerirungentoo <irungentoo@gmail.com>2013-06-28 09:15:19 -0400
commitfd44c68801205eeece6495a641db50467ee4ece5 (patch)
treed54cbf4522128094313d45c5324d22e1eb637016 /core
parent457feeed0b49a83b8244d0046e0daf3a632fc092 (diff)
Couple fixes.
Diffstat (limited to 'core')
-rw-r--r--core/network.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/network.c b/core/network.c
index a20b02f6..bbc1f570 100644
--- a/core/network.c
+++ b/core/network.c
@@ -25,7 +25,7 @@
25#include "network.h" 25#include "network.h"
26 26
27 27
28//returns current time in milleseconds since the epoch. 28//returns current time in milliseconds since the epoch.
29uint64_t current_time() 29uint64_t current_time()
30{ 30{
31 uint64_t time; 31 uint64_t time;
@@ -62,7 +62,7 @@ int sendpacket(IP_Port ip_port, char * data, uint32_t length)
62 62
63} 63}
64 64
65//Function to recieve data, ip and port of sender is put into ip_port 65//Function to receive data, ip and port of sender is put into ip_port
66//the packet data into data 66//the packet data into data
67//the packet length into length. 67//the packet length into length.
68//dump all empty packets. 68//dump all empty packets.
@@ -73,7 +73,7 @@ int recievepacket(IP_Port * ip_port, char * data, uint32_t * length)
73 (*(int *)length) = recvfrom(sock, data, MAX_UDP_PACKET_SIZE, 0, (struct sockaddr *)&addr, &addrlen); 73 (*(int *)length) = recvfrom(sock, data, MAX_UDP_PACKET_SIZE, 0, (struct sockaddr *)&addr, &addrlen);
74 if(*(int *)length <= 0) 74 if(*(int *)length <= 0)
75 { 75 {
76 //nothing recieved 76 //nothing received
77 //or empty packet 77 //or empty packet
78 return -1; 78 return -1;
79 } 79 }
@@ -106,7 +106,7 @@ int init_networking(IP ip ,uint16_t port)
106 //initialize our socket 106 //initialize our socket
107 sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); 107 sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
108 108
109 //Functions to increase the size of the send and recieve UDP buffers 109 //Functions to increase the size of the send and receive UDP buffers
110 //NOTE: uncomment if necessary 110 //NOTE: uncomment if necessary
111 /* 111 /*
112 int n = 1024 * 1024 * 2; 112 int n = 1024 * 1024 * 2;