mirror of
https://github.com/upa/mscp.git
synced 2026-02-04 03:24:58 +08:00
use size_t for bitrate (for portability)
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define MSCP_DIRECTION_L2R 1 /** Indicates local to remote copy */
|
||||
#define MSCP_DIRECTION_R2L 2 /** Indicates remote to local copy */
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
#include <semaphore.h>
|
||||
|
||||
struct bwlimit {
|
||||
sem_t *sem; /* semaphore */
|
||||
uint64_t bps; /* limit bit-rate (bps) */
|
||||
uint64_t win; /* window size (msec) */
|
||||
size_t amt; /* amount of bytes can be sent in a window */
|
||||
sem_t *sem; /* semaphore */
|
||||
size_t bps; /* limit bit-rate (bps) */
|
||||
size_t win; /* window size (msec) */
|
||||
size_t amt; /* amount of bytes can be sent in a window */
|
||||
|
||||
ssize_t credit; /* remaining bytes can be sent in a window */
|
||||
struct timespec wstart, wend; /* window start time and end time */
|
||||
|
||||
Reference in New Issue
Block a user