fix tt socket for Web
big reorganisation