Skip to content
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

web apiつくる #36

Closed
ddddddO opened this issue Jun 14, 2024 · 5 comments
Closed

web apiつくる #36

ddddddO opened this issue Jun 14, 2024 · 5 comments

Comments

@ddddddO
Copy link
Owner

ddddddO commented Jun 14, 2024

今のpackemonは

  • ローカルのネットワークインタフェースをMonitor
  • ローカルのネットワークインタフェースへGenerator

それに追加(別バイナリ?別サブコマンド?)で、

  • リモートからリクエストして、ローカルのネットワークインタフェースのパケットをレスポンスするapi
    • websocket? gRPC?
  • リモートからリクエストして、ローカルのネットワークインタフェースへパケット送信するapi

リモートがclientで、ローカルがserver

  • クライアントに、Monitor/Generatorの画面
  • サーバーに、2つのエンドポイントとその処理
    • clientのMonitorに出力するためのPassiveChを常時レスポンスするエンドポイント
    • clientのGeneratorで生成されたフレームを受け取ってネットワークインタフェースへSendするエンドポイント

clientの画面(Monitor/Generator)は、今のtuiだけじゃなくReactでも作ってみたい。むしろこちらが本命

@ddddddO ddddddO mentioned this issue Jun 15, 2024
@ddddddO
Copy link
Owner Author

ddddddO commented Jun 15, 2024

raspberry pi でServer として起動したけど、client / server でやり取りする通信はMonitorで非表示になるようにしないとノイジー

@ddddddO
Copy link
Owner Author

ddddddO commented Jun 15, 2024

ちゃんとReactのドキュメントを読む
https://ja.react.dev/learn

@ddddddO
Copy link
Owner Author

ddddddO commented Jun 15, 2024

cmd配下にapiほる

@ddddddO
Copy link
Owner Author

ddddddO commented Jun 15, 2024

https://x.com/honey321998/status/1785882749670396269
vite で Reactフレームワークでなく、React ライブラリ使う環境用意

https://zenn.dev/kazukix/articles/react-setup-2024#vite
この辺りのコマンド実行

@ddddddO
Copy link
Owner Author

ddddddO commented Jun 16, 2024

一旦できたということで

@ddddddO ddddddO closed this as completed Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant