Package anbxj

Class Channel_ExistingSocket

java.lang.Object
anbxj.Channel_Abstraction
anbxj.Channel_ExistingSocket

public class Channel_ExistingSocket extends Channel_Abstraction
A channel implementation that wraps an already connected Socket.

This class is used when a socket has been accepted by a server (or created by a client) outside the normal channel opening process. It delegates stream initialisation to the superclass and handles the closing of the underlying socket.

See Also:
  • Constructor Details

    • Channel_ExistingSocket

      public Channel_ExistingSocket(Socket socket, Channel_Properties cp)
      Constructs a new channel that uses the given already connected socket.
      Parameters:
      socket - the already connected socket (must be connected)
      cp - the channel properties (host, port, type, etc.) - may be used for debugging or configuration, but the socket itself is already established.
      Throws:
      NullPointerException - if socket or cp is null
  • Method Details