move c++ part of socket mmi to plugin