Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

222
Views
Separating Buffer Data That isn't in the Same Row

I have an Socket in node.js. I send 3 different data to my server. But my 2 and 3 datas are going together to server.

My Socket server code is:

var net = require("net");
const server = new net.Server()

server.on("connection", (client) => {
  client.on("data", (data) => {
    console.log(data)
  })
})

server.listen(5000)

My Socket client code is:

var net = require("net");
const client = new net.Socket()

client.connect({ host: "localhost", port: 5000 }, () => {
  console.log("Client Connected !");
  client.write(Buffer.from([0x82, 0x80, 0x09, 0xf6, 0x9f, 0x00, 0x04, 0x73, 0x65, 0x66, 0x61, 0x00]))
  client.write(Buffer.from([0x30, 0x08, 0x00, 0x04, 0x73, 0x65, 0x66, 0x61, 0x61, 0x73]))
  client.write(Buffer.from([0x30, 0x08, 0x00, 0x04, 0x73, 0x65, 0x66, 0x61, 0x61, 0x73]))
});

When I run this codes, Appear in server console like this below

1 .row -> <Buffer 82 80 09 f6 9f 00 04 73 65 66 61 00>
2. row -> <Buffer 30 08 00 04 73 65 66 61 61 73 30 08 00 04 73 65 66 61 61 73>

That you see in 2. row, client datas come to server together. How can I solve this problem.Thanks

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!