-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.py
More file actions
48 lines (39 loc) · 1.29 KB
/
config.py
File metadata and controls
48 lines (39 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# ============================================================================
# SERVER CONFIGURATION
# ============================================================================
# Change this to your server's IP address for multi-device access
SERVER_HOST = "10.22.39.83"
# SERVER_HOST = "127.0.0.1"
# Server ports (usually don't need to change these)
CHAT_PORT = 9009
FILE_PORT = 9010
COLLAB_PORT = 9011
EXEC_PORT = 9012
ROOM_MGMT_PORT = 9013
# Streamlit frontend port
FRONTEND_PORT = 8501
# =============================
# FILE TRANSFER SIMULATION
# =============================
# Set the probability of simulated packet loss (0.0 = no loss, 0.1 = 10% loss, 0.5 = 50% loss)
# Used by file_transfer client and server for testing Tahoe/Reno
# WARNING: Non-zero values will cause upload failures until retransmission logic is added
SYNCROX_LOSS_PROB = 0.1 # Set to 0.0 for reliable transfers
# =============================
# NETWORKING CONSTANTS
# =============================
CHUNK_SIZE = 4096
ALPHA = 0.125
BETA = 0.25
MIN_RTO = 200.0
INITIAL_CWND = 1.0
INITIAL_SSTHRESH = 16.0
DEFAULT_RWND = 32
# =============================
# TIMEOUTS & RETRIES
# =============================
HANDSHAKE_TIMEOUT = 5.0
TERMINATION_TIMEOUT = 3.0
MAX_RETRIES = 5
UDP_RECV_TIMEOUT = 2.0
TOTAL_DOWNLOAD_TIMEOUT = 30.0