Skip to content

Commit

Permalink
docs: urge the user to listen to the error event
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasgloning committed Sep 2, 2023
1 parent f268d9e commit 81f504c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/peer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,11 @@ export class Peer extends EventEmitterWithError<PeerErrorType, PeerEvents> {

/**
* Connects to the remote peer specified by id and returns a data connection.
* @param peer The brokering ID of the remote peer (their {@apilink Peer.id}).
*
* Make sure to listen to the `error` event of the resulting {@link DataConnection}
* in case the connection fails.
*
* @param peer The brokering ID of the remote peer (their {@link Peer.id}).
* @param options for specifying details about Peer Connection
*/
connect(peer: string, options: PeerConnectOption = {}): DataConnection {
Expand Down

0 comments on commit 81f504c

Please sign in to comment.