How xuzhen/dukto works
Dukto is a cross-platform LAN tool for sending files and text between nearby devices. The principal workflow is to discover or choose a peer, initiate a transfer, and report its progress or completion; receiving peers save incoming items locally. The graph also includes settings, recent transfers, and platform notifications as supporting capabilities. The excerpts show the UI-to-transfer calls and sender/receiver mechanics, but not all protocol wiring or UI bindings, so uncertain connections are omitted.
Main entry points: guibehind.cpp UI controller · messenger.cpp LAN messenger · sender.cpp Transfer sender · duktoprotocol.cpp Transfer protocol
Components 19
Application and UI
- Dukto window
- UI controller
guibehind.cpp - Peer list model
buddylistitemmodel.cpp - Recent list model
recentlistitemmodel.cpp - IP address model
ipaddressitemmodel.cpp
Peer discovery
- LAN messenger
network/messenger.cpp - Peer messages
network/buddymessage.cpp
Transfer runtime
- Transfer protocol
duktoprotocol.cpp - Transfer sender
network/sender.cpp - Transfer receiver
network/receiver.cpp - File data
network/filedata.cpp
Preferences and platform
- Preferences
settings.cpp - Transfer notifications
systemnotification.cpp - Platform services
platform.cpp - Theme handling
theme.cpp - System tray
systemtray.cpp
Other components
- User
- LAN peer
- Local files
Connections 21
- User → Dukto window: uses
- Dukto window → UI controller: delegates UI actions
- UI controller → Peer list model: updates peers
- UI controller → Transfer protocol: starts transfers
- UI controller → LAN messenger: discovers peers
- LAN messenger → Peer messages: parses and serializes
- LAN messenger → LAN peer: exchanges UDP messages
- LAN messenger → UI controller: reports peers
- Transfer protocol → Transfer sender: dispatches sends
- Transfer protocol → Transfer receiver: dispatches receives
- Transfer sender → File data: builds file list
- Transfer sender → LAN peer: sends items
- LAN peer → Transfer receiver: sends items
- Transfer sender → Local files: reads files
- Transfer receiver → Local files: writes received items
- UI controller → Preferences: reads preferences
- UI controller → Recent list model: updates history
- UI controller → Transfer notifications: reports transfer status
- UI controller → Platform services: requests platform behavior
- UI controller → Theme handling: changes theme
- Dukto window → System tray: integrates tray controls