Add functions to gt_socket.