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
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
COPY qgo.quizer.space.pem .
|
||||
COPY qgo.quizer.space-key.pem .
|
||||
RUN go build -o main .
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
4
main.go
4
main.go
@@ -52,12 +52,12 @@ func handleChatSession(session *webtransport.Session) {
|
||||
return
|
||||
}
|
||||
|
||||
go func(s webtransport.Stream) {
|
||||
go func(s *webtransport.Stream) {
|
||||
defer s.Close()
|
||||
buf := make([]byte, 1024)
|
||||
n, _ := s.Read(buf)
|
||||
fmt.Printf("Message: %s\n", string(buf[:n]))
|
||||
s.Write([]byte("Server: OK"))
|
||||
}(*stream)
|
||||
}(stream)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user