Added another function to socket utility library.