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
"github.com/rachel-mp4/lrcproto/gen/go"
8
"google.golang.org/protobuf/proto"
9
"log"
0
10
"net/http"
11
"sync"
12
"time"
···
173
return
174
}
175
defer conn.Close()
0
0
0
0
0
0
0
0
176
177
ctx, cancel := context.WithCancel(context.Background())
178
client := &client{
···
7
"github.com/rachel-mp4/lrcproto/gen/go"
8
"google.golang.org/protobuf/proto"
9
"log"
10
+
"net"
11
"net/http"
12
"sync"
13
"time"
···
174
return
175
}
176
defer conn.Close()
177
+
178
+
if netConn := conn.UnderlyingConn(); netConn != nil {
179
+
if tcpConn, ok := netConn.(*net.TCPConn); ok {
180
+
if err := tcpConn.SetNoDelay(true); err != nil {
181
+
log.Println("failed to denagle")
182
+
}
183
+
}
184
+
}
185
186
ctx, cancel := context.WithCancel(context.Background())
187
client := &client{