peer: socket -> createSocket parameter

Signed-off-by: Fedor Indutny <fedor@indutny.com>