implement a bunch of utility functions on tun device primitive

This commit is contained in:
lilly 2026-05-21 16:44:01 +02:00
commit d94f20d042
Signed by: lilly
SSH key fingerprint: SHA256:y9T5GFw2A20WVklhetIxG1+kcg/Ce0shnQmbu1LQ37g
9 changed files with 248 additions and 82 deletions

View file

@ -1,7 +1,7 @@
defmodule P2pChat do
def hello do
{:ok, pid1} = P2pChat.Transport.start_link(port: 12345)
netid1 = P2pChat.Transport.get_netid(pid1)
_netid1 = P2pChat.Transport.get_netid(pid1)
{:ok, pid2} = P2pChat.Transport.start_link(port: 12346)
netid2 = P2pChat.Transport.get_netid(pid2)