Package anbxj

# Class Channel_Server

java.lang.Object
anbxj.Channel_Abstraction
anbxj.Channel_Server

public class Channel_Server extends Channel_Abstraction
Server Channel

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected Socket`
  `client`
  The client socket used for communication.
  `protected static final AnBx_Layers`
  `layer`
  The layer associated with the network.
  `protected ServerSocket`
  `server`
  The server socket used for communication.

  ### Fields inherited from class anbxj.Channel_Abstraction

  `cp`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Channel_Server(Channel_Properties cp)`
  Constructor for Channel_Server.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `Close()`
  Closes the server channel.
  `void`
  `Open()`
  Opens the server channel.
  `protected void`
  `openClient(int port)`
  Accepts a client connection and opens the stream.
  `protected void`
  `openServerSocket(int port)`
  Opens the server socket on the specified port.
  `protected void`
  `openStream(int port)`
  Opens the stream based on the channel type.

  ### Methods inherited from class anbxj.Channel_Abstraction

  `checkPort, getChannelRole, OpenStreams, Receive, Receive, safeReadObject, Send`

  ### Methods inherited from class java.lang.Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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`