Make RemoteServer and Shared library compilable on unix systems

Signed-off-by: Frca <killerfrca@gmail.com>
Rewrite app socketing

Signed-off-by: Frca <killerfrca@gmail.com>