tangled
alpha
login
or
join now
moth11.net
/
lrcd
2
fork
atom
websocket-based lrcproto server
2
fork
atom
overview
issues
pulls
pipelines
add denagle
moth11.net
7 months ago
2f8d47fe
fa97afdd
+9
1 changed file
expand all
collapse all
unified
split
server.go
+9
server.go
···
7
7
"github.com/rachel-mp4/lrcproto/gen/go"
8
8
"google.golang.org/protobuf/proto"
9
9
"log"
10
10
+
"net"
10
11
"net/http"
11
12
"sync"
12
13
"time"
···
173
174
return
174
175
}
175
176
defer conn.Close()
177
177
+
178
178
+
if netConn := conn.UnderlyingConn(); netConn != nil {
179
179
+
if tcpConn, ok := netConn.(*net.TCPConn); ok {
180
180
+
if err := tcpConn.SetNoDelay(true); err != nil {
181
181
+
log.Println("failed to denagle")
182
182
+
}
183
183
+
}
184
184
+
}
176
185
177
186
ctx, cancel := context.WithCancel(context.Background())
178
187
client := &client{