add open and close socket application