A simple application using SCION that sends one packet from a client to a server which replies back.
Server:
go run helloworld.go -listen 127.0.0.1:1234
Client:
go run helloworld.go -remote 17-ffaa:1:a,[127.0.0.1]:1234
Replace 17-ffaa:1:a with the address of the AS in which the server is running.
This SCION application is very simple, and it demonstrates what is needed to send data using SCION:
Server:
- Open listener connection (
pan.ListenUDP). - Read packets from connection (
conn.ReadFrom). - Write reply packet (
conn.WriteTo). - Close listener connection.
Client:
- Open client connection (
pan.Dial). - Write packet to connection (
conn.Write). - Read reply packet (
conn.Read), with timeout - Close client connection.