Got working server code.