-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WSS: Add Web Socket Server #795
Conversation
public override string Description => "Enables WebSocket notifications for the node"; | ||
|
||
private Settings _settings; | ||
private static readonly Dictionary<Guid, BlockWebSocketBehavior> Handlers = new(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should be using ConcurrentDictionary, so you dont have to use Lock. Reason being if have, let's say a million clients using "lock" will have a delay and lock the thread for new clients connecting to the server. You can use ConcurrentDictionary to fix this problem. because like i said new clients wont get a response. especially if there is blocks with 5k transactions in it. They would be waiting for lock to be lifted.
is there a way for other plugins to add functionality to the wss like RPCMethhods works? |
* 'wss' of github.com:Liaojinghui/neo-modules: RpcServer: added GetContractState by contract id support (neo-project#813) rpc: add FindStorage (neo-project#805)
This for runtime only correct? or can you go back in time. Like the place you disconnected. I didn't see anything in code and was just wondering if it was thought upon for maybe a future feature add-on. Other than that it looks good. Thanks for changing to |
@cschuchardt88 jsut made it runtime. can add other features little by little, otherwise this pr would be too complex to review. |
No, not going to make it work that way. this is just for event notification. |
#716 mentions |
Well,,,,maybe i should combine rpc and wss plugins to add those rpc methods |
* master: remove Travis logo (neo-project#818) Fix 3.6 (neo-project#816) DBFTPlugin: adapt Conflicts attribute verification (neo-project#802)
Why don't you just import <PackageReference Include="Neo.Network.RPC.RpcClient" Version="3.6.1" /> |
casue my first thought is they should be seperate projects and do not rely on each other. Let's try to have your rest done first, rpc will be updated anyway. |
True, I was just thinking less code to maintain. |
@Liaojinghui Check it out. If you like I can convert to see in actionRecording.2023-11-21.204801.mp4 |
@cschuchardt88 its a good idea, we can discuss it later after the monorepo. |
use #847 instead |
Trying to add a wss plugin.
neo-project/neo#2853 This is a good suggestion, maybe we can have
wss
supported