Package org.bitcoinj.net
Interface MessageWriteTarget
-
- All Known Implementing Classes:
BlockingClient
,NioClient
public interface MessageWriteTarget
A target to which messages can be written/connection can be closed
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
closeConnection()
Closes the connection to the server, triggering theStreamConnection.connectionClosed()
event on the network-handling thread where all callbacks occur.ListenableCompletableFuture<java.lang.Void>
writeBytes(byte[] message)
Writes the given bytes to the remote server.
-
-
-
Method Detail
-
writeBytes
ListenableCompletableFuture<java.lang.Void> writeBytes(byte[] message) throws java.io.IOException
Writes 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.
-
-