automat state machin with tcp & ws message handlers
refactor
wip (simulation of simulation)