Your answer is a bit like answering “How to plant an apple tree” with “Here, take this apple its already grown.”
@kaa.python wants to implement WS directly. Maybe he has some client that sends data over WS which is out of his control but he needs to fullfil its protocol which is tatally different to the way phioenix works? Maybe channels do introduce some additional transport overhead he wants to not have because he has to deal with hard bandwith limits? Perhaps he just wants to learn how WS works?
To answer the actual question.
I were not aware of any websocket “server” so far. But this question made me google a bit around, and I found one small library at hex which does not tell it were client only: https://hex.pm/packages/web_socket
This still needs plug though… I do hope it will help you anyway. If not you will probably need to dig into phoenix, how they do it.