Handling dropped clients in a duplex binding WCF application

后端 未结 2 1436
迷失自我
迷失自我 2020-12-14 03:31

We are using a pub-sub model in our WCF application that pretty much follows the Microsoft sample: Design Patterns: List-Based Publish-Subscribe.

Whilst the service

2条回答
  •  [愿得一人]
    2020-12-14 04:18

    Handling those events will keep your list of subscribers synchronized. It is indeed robust enough. Just remember that if a client drops during a transmission of a message, you might get an exception before those events fire, so be ready to ignore them so that the events can clean up.

    Except for removing the client from he subscribers list, additional cleanup depends entirely on your application (i.e. freeing resources you acquired when the client connected). I am not aware of any other cleanup that is required.

提交回复
热议问题