src/main/java/polsl/project/server/connection/ServerBootstrap.java
public void startListening(final int port)
	{
		new Thread(() -> {
			final ServerSocket serverSocket;
			try
			{
				serverSocket = new ServerSocket(port);

				while (true)
				{
					System.out.println("Waiting for connection...");

					final Socket newConnection = serverSocket.accept();

					//write test message
					PrintWriter out = new PrintWriter(newConnection.getOutputStream(), true);

					out.println("Hello from broadcastng server {ip:" + serverSocket.getInetAddress() //
							.getHostAddress() + ":" + serverSocket.getLocalPort() + "}");


					processNewConnection(newConnection);
				}
			}
			catch (IOException e)
			{
				throw new RuntimeServerException(e);
			}
		}).start();
	}
/**
	 * Start new thread that will listen for incoming connection - and will wrap each new connection with corresponding
	 * thread responsible for handling input/output data.
	 *
	 * @throws RuntimeServerException when unable to start server.
	 */
Start new thread that will listen for incoming connection - and will wrap each new connection with corresponding
thread responsible for handling input/output data.

@throws RuntimeServerException when unable to start server.
Start new thread that will listen for incoming connection - and will wrap each new connection with corresponding thread responsible for handling input / output data . @throws RuntimeServerException when unable to start server .
public void startListening(final int port)
	{
		new Thread(() -> {
			final ServerSocket serverSocket;
			try
			{
				serverSocket = new ServerSocket(port);
				while (true)
				{
					System.out.println("Waiting for connection...");
					final Socket newConnection = serverSocket.accept();
					PrintWriter out = new PrintWriter(newConnection.getOutputStream(), true);
					out.println("Hello from broadcastng server {ip:" + serverSocket.getInetAddress() 
							.getHostAddress() + ":" + serverSocket.getLocalPort() + "}");
					processNewConnection(newConnection);
				}
			}
			catch (IOException e)
			{
				throw new RuntimeServerException(e);
			}
		}).start();
	}
public void startListening ( final int port ) { new Thread ( ( ) -> { final ServerSocket serverSocket ; try { serverSocket = new ServerSocket ( port ) ; while ( true ) { System . out . println ( "Waiting for connection..." ) ; final Socket newConnection = serverSocket . accept ( ) ; PrintWriter out = new PrintWriter ( newConnection . getOutputStream ( ) , true ) ; out . println ( "Hello from broadcastng server {ip:" + serverSocket . getInetAddress ( ) . getHostAddress ( ) + ":" + serverSocket . getLocalPort ( ) + "}" ) ; processNewConnection ( newConnection ) ; } } catch ( IOException e ) { throw new RuntimeServerException ( e ) ; } } ) . start ( ) ; }
Start new thread that will listen for incoming connection - and will wrap each new connection with corresponding
 thread responsible for handling input/output data.
Start new thread that will listen for incoming connection - and will wrap each new connection with corresponding thread responsible for handling input / output data .
//write test message //