Class Server

java.lang.Object
com.example.brickpaint.Server
All Implemented Interfaces:
Runnable

public class Server extends Object implements Runnable
[WORK IN PROGRESS] Handles the creation and processes of a server thread
Author:
matde
  • Constructor Summary

    Constructors
    Constructor
    Description
    Server(int port, int backlog, InetAddress address, ButtonManager manager1)
    Base constructor for the server thread that initializes the server socket
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    run()
    Main thread the runs the server, it will look for incoming connections and assign a client handler to each one until the stop function is called
    void
    Helper function that will stop the server thread loop when called

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Server

      public Server(int port, int backlog, InetAddress address, ButtonManager manager1)
      Base constructor for the server thread that initializes the server socket
      Parameters:
      port - The port to start the server on
      backlog - The maximum number of connections that can be queued
      address - The InetAddress that the server should use
      manager1 - The UI Controller for the application
  • Method Details

    • stop

      public void stop()
      Helper function that will stop the server thread loop when called
    • run

      public void run()
      Main thread the runs the server, it will look for incoming connections and assign a client handler to each one until the stop function is called
      Specified by:
      run in interface Runnable