/** * @param componentName the name of the component - represented in the prompt * @param config the configuration to use * @param userRequestStream the input stream to read user input from * @param userResponseStream the output stream to write the console output to */ public Chatserver( String componentName, Config config, InputStream userRequestStream, PrintStream userResponseStream) { super(componentName, config, userRequestStream, userResponseStream); this.startTcpServer(config.getInt("tcp.port")); this.startUdpServer(config.getInt("udp.port")); }