source: code/trunk/cmd/jounce/main.go@ 5

Last change on this file since 5 was 5, checked in by contact, 5 years ago

Add connection registration

File size: 324 bytes
RevLine 
[1]1package main
2
3import (
4 "log"
5 "net"
6
7 "git.sr.ht/~emersion/jounce"
8)
9
10func main() {
11 addr := ":6667"
12
13 ln, err := net.Listen("tcp", addr)
14 if err != nil {
15 log.Fatalf("failed to start listener: %v", err)
16 }
17
[5]18 s := jounce.Server{Hostname: "localhost"}
[3]19
[1]20 log.Printf("Server listening on %v", addr)
[3]21 log.Fatal(s.Serve(ln))
[1]22}
Note: See TracBrowser for help on using the repository browser.