class_docstr: SocketServer
  
  A basic Python socket server
class_docstr_tok: ["SocketServer","A","basic","Python","socket","server"]
docstr: Initializes a Socket server instance from a serializer Keras model
  and a port to listen to.
  
  :param model: Serialized Keras model
  :param port: int, port to run the socket on
docstr_tok: ["Initializes","a","Socket","server","instance","from","a","serializer","Keras","model","and","a","port","to","listen","to",".",":","param","model",":","Serialized","Keras","model",":","param","port",":","int",",","port","to","run","the","socket","on"]
code: def __init__(self, model: Model, port: int, mode: str, **kwargs):
      """Initializes a Socket server instance from a serializer Keras model
      and a port to listen to.
  
      :param model: Serialized Keras model
      :param port: int, port to run the socket on
      """
  
      super().__init__(model, port, mode, **kwargs)
      self.socket = None
      self.runs = False
      self.connections = []
      self.lock = Lock()
      self.thread = None
  
imports: import abc
  import pickle
  import socket
  from threading import Thread
  from flask import Flask, request
  from multiprocessing import Process
  from tensorflow.keras.models import Model
  from elephas.utils.sockets import determine_master
  from elephas.utils.sockets import receive, send
  from elephas.utils.serialization import dict_to_model
  from elephas.utils.rwlock import RWLock
  from elephas.utils.notebook_utils import is_running_in_notebook
  from elephas.utils import subtract_params
label_desc: Use image node_id 1 to create a new SocketServer object from inherited base classes: BaseParameterServer with example: obj = SocketServer(model, port, mode)