Added a rudimentary functionality to a socket handler