Pushed socket code to matlab