Electron sending buffer to server (TCP client)

Hello,

I have some problems with my code. I try to send a buffer from Electron to my server with TCPClient. Here is the code on the Electron :

const size_t bufSize = 8;
unsigned char buf[bufSize];

for(size_t i = 0; i < bufSize; i++) {
    buf[i] = i;
}

client.write(buf, bufSize); // or client.write(&buf[0], bufSize)

And I try to get the buffer on my server with a Python script :

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((TCP_IP, TCP_PORT))
s.listen(1)

conn, addr = s.accept()
data = conn.recv(BUFFER_SIZE)
print data

But all I get on my terminal is : > PuTTY
I don’t receive any data.

Does anybody know why, or had the same problem ?

Thanks for your answer !