Skip to content

malpower/MalWebSocket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MalWebSocket

My Websocket class made by 100% pure javascript.

##How to use

var net=require("net");
var MSocket=require("./MSocket");


var server=net.createServer(function(s)
{
    var socket=new MSocket(s,function()
    {
        socket.bindReader(function(msg)
        {
            console.log(msg.fin);
            console.log(msg.length);
            console.log(msg.opCode);
            console.log(msg.content.toString());
            socket.write("SDLFJSLDFJLSKDFJSLDKJF");
        });
        socket.ack();
        console.log(socket.subProtocol);
    });
});
server.listen(8080);
console.log("Server started!");

About

My Websocket class made by 100% pure javascript.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published