Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-16820

Provide example of a WebSocketHandler implementation for WebFlux

    Details

    • Last commented by a User:
      false

      Description

      In HttpServerOperations.sendWebsocket() Method 

       if (replace(ops)) {
       return FutureMono.from(ops.handshakerResult)
       .then(Mono.defer(() -> Mono.from(websocketHandler.apply(ops, ops))))
       .doAfterSuccessOrError(ops);
       }
      

      Spring will auto close connection after sending handshake info if My WebSocketHandler  return any value except  Mono.never()

       

      if My WebSocketHandler return Mono.never()

         the connection will keep alive but Server can't recevie message from Browser(Chrome)

         but I can send message from Server to Browser

        Attachments

          Activity

            People

            • Assignee:
              rstoya05-aop Rossen Stoyanchev
              Reporter:
              zhw zhw
              Last updater:
              Rossen Stoyanchev
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                5 weeks, 1 day ago