Browse Source

Packet Fragmentation should be totally fixed now, This needs extensive testing

MissValeska 10 years ago
parent
commit
bf7e67f9aa
1 changed files with 8 additions and 0 deletions
  1. 8
    0
      src/inet.c

+ 8
- 0
src/inet.c View File

@@ -1056,6 +1056,13 @@ ssize_t inet_sendto(int s, const void *msg, size_t len, int flags,
1056 1056
 	fd_set fdset;
1057 1057
 	int ret;
1058 1058
         
1059
+        int sendbuf;
1060
+        socklen_t optlen;
1061
+        optlen = sizeof(sendbuf);
1062
+        int res = getsockopt(s, SOL_SOCKET, SO_SNDBUF, &sendbuf, &optlen);
1063
+                                
1064
+        error("GetSockOpt: %i \n", res);
1065
+        
1059 1066
         error("Socket: %i Data: %p Data Length: %u Flags: %i Address: %p Address Length: %u", s, msg, len, flags, to, tolen);
1060 1067
         
1061 1068
 	if((err=sendto(s, msg, len, flags, to, tolen))==-1) {
@@ -1077,6 +1084,7 @@ ssize_t inet_sendto(int s, const void *msg, size_t len, int flags,
1077 1084
                                     if(bytesleft > 64000) {
1078 1085
                                         inet_sendto(s, msg, 64000, flags, to, tolen);
1079 1086
                                         bytesleft -= 64000;
1087
+                                        msg += 64000
1080 1088
                                         //err=inet_sendto(s, ((const char *)msg+(len/2)),
1081 1089
                                                  //len-(len/2), flags, to, tolen);
1082 1090
                                     }

Loading…
Cancel
Save