The examples
directory contains an implementation of a simple client and
server which can publish and subscribe to date
tracks using MoQ. The publisher
of a date
track publishes timestamps every second and sends them to the
subscribers. Subscribers receive the timestamp objects.
Download the example:
git clone https://github.com/mengelbart/moqtransport.git
cd moqtransport/examples/date
To run the server, run:
go run *.go -server -publish
Then, open a new shell and start a client:
go run *.go -subscribe
To use WebTransport, add the -webtransport
and -addr
flags:
Server:
go run *.go -server -publish -webtransport
Client:
go run *.go -subscribe -webtransport -addr https://localhost:8080/moq