as
close socket properly in simulator