mirror of
https://github.com/yarrick/iodine.git
synced 2024-12-26 15:03:31 +02:00
downstream fragsize is now per user
This commit is contained in:
parent
78aaf26369
commit
0ed202dd18
3 changed files with 3 additions and 2 deletions
|
@ -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 a new issue