update server socket function