Accept HTTP1 in naive inbound

This commit is contained in:
世界
2022-08-23 13:22:03 +08:00
parent c9b7acd22c
commit 9edfe7d9d3
12 changed files with 356 additions and 118 deletions

View File

@@ -212,6 +212,15 @@ func (a *myInboundAdapter) injectTCP(conn net.Conn) {
}
}
func (a *myInboundAdapter) routeTCP(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) {
a.logger.InfoContext(ctx, "inbound connection from ", metadata.Source)
hErr := a.newConnection(ctx, conn, metadata)
if hErr != nil {
conn.Close()
a.NewError(ctx, E.Cause(hErr, "process connection from ", metadata.Source))
}
}
func (a *myInboundAdapter) loopUDPIn() {
defer close(a.packetOutboundClosed)
_buffer := buf.StackNewPacket()