Package org.bitcoinj.net
Interface MessageWriteTarget
- 
- All Known Implementing Classes:
 BlockingClient,NioClient
public interface MessageWriteTargetA target to which messages can be written/connection can be closed 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcloseConnection()Closes the connection to the server, triggering theStreamConnection.connectionClosed()event on the network-handling thread where all callbacks occur.com.google.common.util.concurrent.ListenableFuturewriteBytes(byte[] message)Writes the given bytes to the remote server. 
 - 
 
- 
- 
Method Detail
- 
writeBytes
com.google.common.util.concurrent.ListenableFuture writeBytes(byte[] message) throws java.io.IOExceptionWrites the given bytes to the remote server. The returned future will complete when all bytes have been written to the OS network buffer.- Throws:
 java.io.IOException
 
- 
closeConnection
void closeConnection()
Closes the connection to the server, triggering theStreamConnection.connectionClosed()event on the network-handling thread where all callbacks occur. 
 - 
 
 -