Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upFeature Request: Deno.Listener.rid #2862
Comments
This comment has been minimized.
This comment has been minimized.
|
@sidntrivedi012 this is good first issue |
This comment has been minimized.
This comment has been minimized.
|
I'll take this one |
This comment has been minimized.
This comment has been minimized.
|
Before I do this, should Deno.Listener even have an rid? The description of listener is "A Listener is a generic network listener for stream-oriented protocols.". This to me means it does not per se have to have an rid because it is not per se one of "open files, sockets, and other concepts". It could also be implemented by a different library in which case it does not need an rid. I might also be completely misunderstanding this. In any case the implementation of Listener, ListenerImpl already has an rid. Can someone clarify if Listener should have an rid? |
This comment has been minimized.
This comment has been minimized.
You're right, there is |
This comment has been minimized.
This comment has been minimized.
|
So this can be closed? |
This comment has been minimized.
This comment has been minimized.
|
There's no current way (that I can see) of accessing the rid. https://github.com/denoland/deno/blob/master/js/net.ts#L146 Am I missing something? |
This comment has been minimized.
This comment has been minimized.
You're also right, basically |
This comment has been minimized.
This comment has been minimized.
Hey @bartlomieju , thanks a lot for pointing this issue out. Will look into it. Thanks :). |
This comment has been minimized.
This comment has been minimized.
|
For @sidntrivedi012 @lucacasonato and other new contributors, also notice that we have https://github.com/denoland/deno_std that needs quite a bit help (it is the standard modules of Deno). It is modeled after Go (and maybe a bit of Python)'s standard library (to avoid unneeded dependency problems that happened in Node), but we are still lacking a lot of features there. It would also be very cool if you want to contribute to it (deno_std is about TypeScript, in comparison to Deno core, which is the bare minimum and more involving in coding in Rust) |
This comment has been minimized.
This comment has been minimized.
|
Also I agree that |
This comment has been minimized.
This comment has been minimized.
|
The actual rid property already exists on the object, it's just a question of the best way to expose it. I guess the question is where is Listener used outside of ListenerImpl? Does it have a rid? Would a null rid be appropriate? It seems logical to me that Listener would expose the ListenerImpl.rid, just as Conn exposes ConnImpl.rid - but I'm not sure of Listener's uses (or planned uses) |
This comment has been minimized.
This comment has been minimized.
|
Confusing questions like this will always arise when you have |
This comment has been minimized.
This comment has been minimized.
Sure, since I am currently learning Javascript and planning to learn typescript as soon as possible. Thus, will jump in soon. Thanks :) |
This comment has been minimized.
This comment has been minimized.
|
So should
Once I know what should happen I can implement it. |
This comment has been minimized.
This comment has been minimized.
|
IMHO
instead of :
|
As per the title, it seems strange that Deno.Listener instances do not have an exposed rid property.