Amjad Alsharafi Amjad50
Amjad50 commented on pull request OxideTalis/oxidetalis#8 2024-07-06 10:03:08 +02:00
feat: Initialize server websocket

This is not an issue, but I'm curios:

Amjad50 commented on pull request OxideTalis/oxidetalis#8 2024-07-06 09:57:15 +02:00
feat: Initialize server websocket

this is different from ServerEventType, there, its using .to_string().into_bytes()

Amjad50 commented on pull request OxideTalis/oxidetalis#8 2024-07-05 18:45:52 +02:00
feat: Initialize server websocket

Ah yes, didn't notice

Amjad50 commented on pull request OxideTalis/oxidetalis#8 2024-07-05 18:30:48 +02:00
feat: Initialize server websocket

small thing, maybe better to rename event_type to event? shorter and its not just the type, as it contain the data as well

Amjad50 commented on pull request OxideTalis/oxidetalis#8 2024-07-05 18:25:38 +02:00
feat: Initialize server websocket

I would use this

serde_json::to_value(&self.event_type).unwrap()["data"].to_string().into_bytes())

first, we don't need to serialize the whole thing as it would include the…

Amjad50 commented on pull request OxideTalis/oxidetalis#8 2024-07-05 09:11:02 +02:00
feat: Initialize server websocket

Error is silently being ignored here

Amjad50 commented on pull request OxideTalis/oxidetalis#8 2024-07-05 09:10:26 +02:00
feat: Initialize server websocket

In general, the ping mechanism is good, but added some notes on small parts of it

Amjad50 commented on pull request OxideTalis/oxidetalis#8 2024-07-05 07:19:51 +02:00
feat: Initialize server websocket

both locks can be replaced by one

Amjad50 commented on pull request OxideTalis/oxidetalis#8 2024-07-05 07:19:51 +02:00
feat: Initialize server websocket

not sure if this >= 5 is intentional, since if someone set the ping time to be very short it will always return false.

Amjad50 commented on pull request OxideTalis/oxidetalis#8 2024-07-05 07:19:51 +02:00
feat: Initialize server websocket

something I noticed, this nonce_limit is just passed everywhere without a need.

Amjad50 commented on pull request OxideTalis/oxidetalis#8 2024-07-05 07:19:51 +02:00
feat: Initialize server websocket

sender is already Clone and is implemented with Arc

Amjad50 commented on pull request OxideTalis/oxidetalis#8 2024-07-05 07:19:51 +02:00
feat: Initialize server websocket

I think both of these is better to be config as well, more configuration options for admin, 10 mins is good enough of course and probably won't change by most ppl

Amjad50 commented on pull request OxideTalis/oxidetalis#8 2024-07-05 07:19:51 +02:00
feat: Initialize server websocket

The separation between the type and event data and then checking manually with is_of_type looks wrong.

Amjad50 suggested changes for OxideTalis/oxidetalis#8 2024-07-05 07:19:51 +02:00
feat: Initialize server websocket