Add httpupgrade test

This commit is contained in:
风扇滑翔翼 2024-06-05 17:39:55 +00:00
parent 9c6685d2ee
commit be29cc39d7
No known key found for this signature in database
GPG key ID: 67746ECEFA41C2B4
3 changed files with 157 additions and 4 deletions

View file

@ -97,7 +97,7 @@ func (s *server) keepAccepting() {
}
}
func listenHTTPUpgrade(ctx context.Context, address net.Address, port net.Port, streamSettings *internet.MemoryStreamConfig, addConn internet.ConnHandler) (internet.Listener, error) {
func ListenHTTPUpgrade(ctx context.Context, address net.Address, port net.Port, streamSettings *internet.MemoryStreamConfig, addConn internet.ConnHandler) (internet.Listener, error) {
transportConfiguration := streamSettings.ProtocolSettings.(*Config)
if transportConfiguration != nil {
if streamSettings.SocketSettings == nil {
@ -147,5 +147,5 @@ func listenHTTPUpgrade(ctx context.Context, address net.Address, port net.Port,
}
func init() {
common.Must(internet.RegisterTransportListener(protocolName, listenHTTPUpgrade))
common.Must(internet.RegisterTransportListener(protocolName, ListenHTTPUpgrade))
}