Adding function for closing socket 

Signed-off-by: GoelVivek <goelvivek2011@gmail.com>