Package org.jgroups.protocols
Class SimpleTCP.Connection
java.lang.Object
org.jgroups.protocols.SimpleTCP.Connection
- All Implemented Interfaces:
Closeable,AutoCloseable,Runnable
- Enclosing class:
SimpleTCP
1 connection per peer to send and receive messages
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected byte[]protected final DataInputStreamprotected final DataOutputStreamprotected final IpAddressprotected final Runnerprotected final Socketprotected final AtomicInteger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected BufferedInputStreamprotected BufferedOutputStreamvoidrun()protected voidsend(byte[] buffer, int offset, int length) protected SimpleTCP.Connectionstart()toString()
-
Field Details
-
sock
-
peer_addr
-
in
-
out
-
runner
-
buffer
protected byte[] buffer -
writers
-
-
Constructor Details
-
Connection
- Throws:
Exception
-
-
Method Details
-
start
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
send
- Throws:
Exception
-
run
public void run() -
toString
-
createBufferedOutputStream
-
createBufferedInputStream
-