Should we create websocker server in temporal activity?

Currently I’m creating workflow with single activity, In this activity we are creating a WebSocket server which will run indefinitely.

Is this good practice?
If not what should be alternative?

Discussing here: Slack