Class BasicTCP

    • Field Detail

      • reaper_interval

        protected long reaper_interval
      • conn_expire_time

        protected long conn_expire_time
      • recv_buf_size

        protected int recv_buf_size
      • send_buf_size

        protected int send_buf_size
      • sock_conn_timeout

        protected int sock_conn_timeout
      • peer_addr_read_timeout

        protected int peer_addr_read_timeout
      • max_length

        protected int max_length
      • tcp_nodelay

        protected boolean tcp_nodelay
      • linger

        protected int linger
      • use_acks

        protected boolean use_acks
      • client_bind_addr

        protected java.net.InetAddress client_bind_addr
      • client_bind_port

        protected int client_bind_port
      • defer_client_bind_addr

        protected boolean defer_client_bind_addr
      • log_details

        protected boolean log_details
    • Constructor Detail

      • BasicTCP

        protected BasicTCP()
    • Method Detail

      • supportsMulticasting

        public boolean supportsMulticasting()
        Description copied from class: TP
        Whether hardware multicasting is supported
        Specified by:
        supportsMulticasting in class TP
      • getReaperInterval

        public long getReaperInterval()
      • setReaperInterval

        public BasicTCP setReaperInterval​(long interval)
      • reaperInterval

        public BasicTCP reaperInterval​(long interval)
      • getConnExpireTime

        public long getConnExpireTime()
      • setConnExpireTime

        public BasicTCP setConnExpireTime​(long time)
      • getRecvBufSize

        public int getRecvBufSize()
      • setRecvBufSize

        public BasicTCP setRecvBufSize​(int r)
      • getSendBufSize

        public int getSendBufSize()
      • setSendBufSize

        public BasicTCP setSendBufSize​(int s)
      • getSockConnTimeout

        public int getSockConnTimeout()
      • setSockConnTimeout

        public BasicTCP setSockConnTimeout​(int s)
      • getMaxLength

        public int getMaxLength()
      • setMaxLength

        public BasicTCP setMaxLength​(int len)
      • getPeerAddrReadTimeout

        public int getPeerAddrReadTimeout()
      • setPeerAddrReadTimeout

        public BasicTCP setPeerAddrReadTimeout​(int p)
      • tcpNodelay

        public boolean tcpNodelay()
      • tcpNodelay

        public BasicTCP tcpNodelay​(boolean t)
      • getLinger

        public int getLinger()
      • setLinger

        public BasicTCP setLinger​(int l)
      • useAcks

        public boolean useAcks()
      • useAcks

        public BasicTCP useAcks​(boolean f)
      • getClientBindAddr

        public java.net.InetAddress getClientBindAddr()
      • setClientBindAddr

        public BasicTCP setClientBindAddr​(java.net.InetAddress c)
      • getClientBindPort

        public int getClientBindPort()
      • setClientBindPort

        public BasicTCP setClientBindPort​(int c)
      • deferClientBindAddr

        public boolean deferClientBindAddr()
      • deferClientBindAddr

        public BasicTCP deferClientBindAddr​(boolean d)
      • logDetails

        public boolean logDetails()
      • logDetails

        public BasicTCP logDetails​(boolean l)
      • init

        public void init()
                  throws java.lang.Exception
        Description copied from class: Protocol
        Called after a protocol has been created and before the protocol is started. Attributes are already set. Other protocols are not yet connected and events cannot yet be sent.
        Specified by:
        init in interface Lifecycle
        Overrides:
        init in class TP
        Throws:
        java.lang.Exception - Thrown if protocol cannot be initialized successfully. This will cause the ProtocolStack to fail, so the the channel constructor will throw an exception
      • sendUnicast

        public void sendUnicast​(PhysicalAddress dest,
                                byte[] data,
                                int offset,
                                int length)
                         throws java.lang.Exception
        Description copied from class: TP
        Send a unicast to a member. Note that the destination address is a *physical*, not a logical address
        Specified by:
        sendUnicast in class TP
        Parameters:
        dest - Must be a non-null unicast address
        data - The data to be sent. This is not a copy, so don't modify it
        Throws:
        java.lang.Exception
      • getInfo

        public java.lang.String getInfo()
        Specified by:
        getInfo in class TP
      • printConnections

        public abstract java.lang.String printConnections()
      • send

        public abstract void send​(Address dest,
                                  byte[] data,
                                  int offset,
                                  int length)
                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • retainAll

        public abstract void retainAll​(java.util.Collection<Address> members)
      • down

        public java.lang.Object down​(Event evt)
        Description copied from class: Protocol
        An event is to be sent down the stack. A protocol may want to examine its type and perform some action on it, depending on the event's type. If the event is a message MSG, then the protocol may need to add a header to it (or do nothing at all) before sending it down the stack using down_prot.down().
        Overrides:
        down in class TP