Skip to content

Instantly share code, notes, and snippets.

@yuta0801
Created April 7, 2020 04:45
Show Gist options
  • Save yuta0801/75102e70d090b87d2cf769cdd5d231bf to your computer and use it in GitHub Desktop.
Save yuta0801/75102e70d090b87d2cf769cdd5d231bf to your computer and use it in GitHub Desktop.
Piping Server上でP2P通信をするときの流れ
@startuml p2p
group クライアント数だけ繰り返す
Uploader -> Server : /:randomにtokenを生成してPOST
Uploader --> Downloader : /:randomを教える
Downloader -> Server : /:randomをGETし:tokenを取得
group ファイル数分繰り返す
Uploader -> Server : /:random/:tokenをGET
Downloader -> Server : /:random/:tokenに欲しいfileをPOST
Downloader -> Server : /:random/:token/:fileをGET
Uploader -> Server : /:random/:token/:fileに供給されたfileをPOST
end
end
@enduml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment