Skip to content

Commit c1f1879

Browse files
orangeclaude
authored andcommitted
docs<libuvpp>: improve documentation structure and troubleshooting guide
- Reorganize KCP test commands for better readability - Add comprehensive troubleshooting section with common issues - Document key implementation details for KCP and UDT protocols - Include debugging techniques for protocol extensions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 086b719 commit c1f1879

File tree

1 file changed

+32
-5
lines changed

1 file changed

+32
-5
lines changed

CLAUDE.md

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ Run KCP protocol tests:
5959
```bash
6060
build/echo-server-kcp &
6161
build/echo-client-kcp
62-
```
63-
64-
Run additional KCP test executables:
65-
```bash
6662
build/test-kcp-simple
6763
build/test-server-client
6864
```
@@ -228,4 +224,35 @@ nm build/libuv.a | grep -i kcp
228224
### Active Development Branch
229225
- Current branch: `v1.x-udt`
230226
- Branch is ahead of origin by 5 commits
231-
- Protocol extensions are actively being developed and tested
227+
- Protocol extensions are actively being developed and tested
228+
229+
## Key Implementation Details
230+
231+
### KCP Protocol Features
232+
- **Adaptive Timer System**: Uses `ikcp_check()` for optimal update intervals
233+
- **Performance Monitoring**: Comprehensive network statistics via `uvkcp_netperf_t`
234+
- **High-Performance Mode**: Aggressive KCP nodelay settings and larger window sizes
235+
- **Hybrid Handshake Protocol**: TCP for connection establishment, UDP for data transfer
236+
237+
### UDT Protocol Features
238+
- **UDT4 Library Integration**: Full UDT v4 implementation compiled from source
239+
- **Socket API Compatibility**: UDT sockets integrated with libuv event loop
240+
- **Performance Monitoring**: UDT-specific performance statistics
241+
242+
### Build System Integration
243+
- Protocol sources are compiled directly into main libuv library (no separate libraries)
244+
- All protocol headers are included in build directories
245+
- Test executables are built alongside core libuv tests
246+
247+
## Troubleshooting
248+
249+
### Common Issues
250+
- **Submodule initialization**: Always run `git submodule update --init --recursive` before building
251+
- **Build failures**: Check that protocol submodules are properly initialized and up to date
252+
- **Test timeouts**: Use `UV_TEST_TIMEOUT_MULTIPLIER=2` for slow machines
253+
- **Protocol verification**: Use `nm` command to verify protocol symbols are in the library
254+
255+
### Debugging Protocol Extensions
256+
- Use `DYLD_PRINT_LIBRARIES=1` on macOS to debug library loading
257+
- Check protocol-specific test executables for protocol-specific issues
258+
- Verify UDP sockets are non-blocking for proper libuv integration

0 commit comments

Comments
 (0)