Modified Socket API listen and subscribe