create SubimeSocketServer and separate functions.