mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-27 12:05:15 +00:00
downstream fragsize is now per user
This commit is contained in:
parent
78aaf26369
commit
0ed202dd18
@ -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 &&
|
||||
(
|
||||
|
@ -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;
|
||||
|
@ -33,6 +33,7 @@ struct user {
|
||||
struct encoder *encoder;
|
||||
int out_acked_seqno;
|
||||
int out_acked_fragment;
|
||||
int fragsize;
|
||||
};
|
||||
|
||||
extern struct user users[USERS];
|
||||
|
Loading…
Reference in New Issue
Block a user