add certs 1
Some checks failed
Create and publish a Docker image 🚀 / build-and-push-image (push) Has been cancelled
Some checks failed
Create and publish a Docker image 🚀 / build-and-push-image (push) Has been cancelled
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
FROM golang:alpine AS builder
|
FROM golang:alpine AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . .
|
COPY . .
|
||||||
|
COPY qgo.quizer.space.pem .
|
||||||
|
COPY qgo.quizer.space-key.pem .
|
||||||
RUN go build -o main .
|
RUN go build -o main .
|
||||||
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|||||||
4
main.go
4
main.go
@@ -52,12 +52,12 @@ func handleChatSession(session *webtransport.Session) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
go func(s webtransport.Stream) {
|
go func(s *webtransport.Stream) {
|
||||||
defer s.Close()
|
defer s.Close()
|
||||||
buf := make([]byte, 1024)
|
buf := make([]byte, 1024)
|
||||||
n, _ := s.Read(buf)
|
n, _ := s.Read(buf)
|
||||||
fmt.Printf("Message: %s\n", string(buf[:n]))
|
fmt.Printf("Message: %s\n", string(buf[:n]))
|
||||||
s.Write([]byte("Server: OK"))
|
s.Write([]byte("Server: OK"))
|
||||||
}(*stream)
|
}(stream)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user