Example #1
0
function SendBuffer(hSocket, sBuffer) {
    var byBuffer = new ByteBuffer();
    var buf = byBuffer.string(sBuffer).pack(true);
    hSocket.write(buf);
};
Example #2
0
 exBuffer.on('data', function(buffer) {
     var bytebuf = new ByteBuffer(buffer);
     var resArr = bytebuf.string().unpack();
     if (funReceive != null)
         funReceive(resArr[0]);
 });
Example #3
0
 exBuffer.on('data', function(hBuffer){
     var bytebuf = new ByteBuffer(hBuffer);
     var resArr = bytebuf.string().unpack();
     funReceive(hSocket, resArr[0]);
 });