Easy to use wrapper for php socket functions.