Bootstrap function.
$buf to $buffer
Socket buffer.
Test