Skip to content

Commit

Permalink
feature(udp_router): add customizable udp router
Browse files Browse the repository at this point in the history
  • Loading branch information
lafirest committed Aug 22, 2021
1 parent 9f9fb84 commit af0139c
Show file tree
Hide file tree
Showing 7 changed files with 828 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
"examples/udp"
]}.

{deps,
[ {gproc, {git, "https://github.com/uwiger/gproc", {tag, "0.8.0"}}}
]}.

{cover_enabled, true}.
{cover_opts, [verbose]}.
{cover_export_enabled, true}.
Expand Down
43 changes: 43 additions & 0 deletions src/udp_router/doc/router.plantuml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
@startuml
skinparam dpi 300
left to right direction

frame client {
card clinet1
card client2
card client3
}

frame router {
label "router converts the udp connection\nto long connection in the application"
agent router1
agent router2
agent router3
}

frame connection {
card connection1
card connection2
card connection3
}

clinet1 .[#red].> router1
client2 .[#blue].> router1
client3 ..> router2
client3 ..> router3

router1 -[#red]-> connection1 : client1
router1 -[#blue]-> connection2 : client2
router2 --> connection3 : client3
router3 --> connection3 : client3

note bottom of router1
different clients use the same UDP channel,e.g NAT
endnote


note right of router
router2 and router3 are multiple channels used by a client,e.g LB
endnote

@enduml
Binary file added src/udp_router/doc/router.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit af0139c

Please sign in to comment.