mirror of
https://github.com/xtr-dev/rondevu-client.git
synced 2025-12-10 10:53:24 +00:00
feat: Replace RondevuConnection with RondevuPeer state machine
- Created type-safe EventEmitter with generics - Implemented state pattern for peer connection lifecycle - Added comprehensive timeout handling for all connection phases - Removed client-provided offer IDs (server generates hash-based IDs) - Replaced RondevuConnection with RondevuPeer throughout - Added states: idle, creating-offer, waiting-for-answer, answering, exchanging-ice, connected, failed, closed - Configurable timeouts: ICE gathering, waiting for answer, creating answer, ICE connection - Better error handling with 'failed' event and error details 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
11
src/index.ts
11
src/index.ts
@@ -23,9 +23,10 @@ export type {
|
||||
// Export bloom filter
|
||||
export { BloomFilter } from './bloom.js';
|
||||
|
||||
// Export connection manager
|
||||
export { RondevuConnection } from './connection.js';
|
||||
// Export peer manager
|
||||
export { default as RondevuPeer } from './peer.js';
|
||||
export type {
|
||||
ConnectionOptions,
|
||||
RondevuConnectionEvents
|
||||
} from './connection.js';
|
||||
PeerOptions,
|
||||
PeerEvents,
|
||||
PeerTimeouts
|
||||
} from './peer.js';
|
||||
|
||||
Reference in New Issue
Block a user