[middleware/socket] Handle properly message which size > 4096

Fix #393