merging unix socket code