added unified socket structure