Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

intitial stream logic #5

Merged
merged 2 commits into from
Aug 5, 2022
Merged

intitial stream logic #5

merged 2 commits into from
Aug 5, 2022

Conversation

ckousik
Copy link
Collaborator

@ckousik ckousik commented Aug 5, 2022

Implemented a simple stream API for the DataChannel.

import { StreamStat } from '@libp2p/interface-connection';
import { logger } from '@libp2p/logger';
// import { logger } from '@libp2p/logger';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need/want any logging?
I suppose that makes sense. The Stream's methods could be called very frequently.

src/stream.ts Show resolved Hide resolved

private dataChannel?: RTCDataChannel;
reset(): void {
this.close();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this, and also some other methods, alter this.stat?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I will add that in a future commit.

src/stream.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@John-LittleBearLabs John-LittleBearLabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTME

@ckousik ckousik merged commit 340e32a into develop Aug 5, 2022
@ddimaria ddimaria linked an issue Aug 12, 2022 that may be closed by this pull request
17 tasks
@github-actions
Copy link

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement webrtc in js-libp2p
2 participants