1
0
mirror of https://github.com/yarrick/iodine.git synced 2024-11-25 14:36:05 +03:00

downstream fragsize is now per user

This commit is contained in:
Erik Ekman 2009-01-05 18:50:46 +00:00
parent 78aaf26369
commit 0ed202dd18
3 changed files with 3 additions and 2 deletions

View File

@ -164,8 +164,7 @@ send_chunk(int dns_fd, int userid) {
int datalen;
int last;
/* TODO change this 1200b value to dynamic */
datalen = MIN(1200, users[userid].outpacket.len - users[userid].outpacket.offset);
datalen = MIN(users[userid].fragsize, users[userid].outpacket.len - users[userid].outpacket.offset);
if (datalen && users[userid].outpacket.sentlen > 0 &&
(

View File

@ -84,6 +84,7 @@ init_users(in_addr_t my_ip, int netbits)
users[i].q.id = 0;
users[i].out_acked_seqno = 0;
users[i].out_acked_fragment = 0;
users[i].fragsize = 4096;
}
return created_users;

View File

@ -33,6 +33,7 @@ struct user {
struct encoder *encoder;
int out_acked_seqno;
int out_acked_fragment;
int fragsize;
};
extern struct user users[USERS];