main socket server class, https