Package anbxj

Class Channel_Server


public class Channel_Server extends Channel_Abstraction
Server Channel
  • Field Details

    • server

      protected ServerSocket server
      The server socket used for communication.
    • client

      protected Socket client
      The client socket used for communication.
    • layer

      protected static final AnBx_Layers layer
      The layer associated with the network.
  • Constructor Details

    • Channel_Server

      public Channel_Server(Channel_Properties cp)
      Constructor for Channel_Server.
      Parameters:
      cp - The Channel_Properties.
  • Method Details

    • openServerSocket

      protected void openServerSocket(int port)
      Opens the server socket on the specified port.
      Parameters:
      port - The port to open the server socket.
    • openClient

      protected void openClient(int port)
      Accepts a client connection and opens the stream.
      Parameters:
      port - The port to open the client connection.
    • openStream

      protected void openStream(int port)
      Opens the stream based on the channel type.
      Parameters:
      port - The port to open the stream.
    • Open

      public void Open()
      Opens the server channel.
      Overrides:
      Open in class Channel_Abstraction
    • Close

      public void Close()
      Closes the server channel.
      Overrides:
      Close in class Channel_Abstraction