- All Known Subinterfaces:
AFSYSTEMSocketExtensions
,AFTIPCSocketExtensions
,AFUNIXSocketExtensions
,AFVSOCKSocketExtensions
- All Known Implementing Classes:
AFDatagramChannel
,AFDatagramSocket
,AFSocket
,AFSocketChannel
,AFSYSTEMDatagramChannel
,AFSYSTEMDatagramSocket
,AFSYSTEMSocket
,AFSYSTEMSocketChannel
,AFTIPCDatagramChannel
,AFTIPCDatagramSocket
,AFTIPCSocket
,AFTIPCSocketChannel
,AFUNIXDatagramChannel
,AFUNIXDatagramSocket
,AFUNIXSocket
,AFUNIXSocketChannel
,AFVSOCKDatagramChannel
,AFVSOCKDatagramSocket
,AFVSOCKSocket
,AFVSOCKSocketChannel
public interface AFSocketExtensions
Defines certain methods that all junixsocket socket implementations share and extend beyond the
standard socket API.
The set of features include methods to support working with ancillary messages (such as file
descriptors) as well as socket credentials.
Keep in mind that the platform this code runs on may not support these features, and exceptions
may be thrown when not checking for the corresponding
AFSocketCapability
first.- Author:
- Christian Kohlschütter
-
Method Summary
Modifier and TypeMethodDescriptionvoid
ensureAncillaryReceiveBufferSize
(int minSize) Ensures a minimum ancillary receive buffer size.int
Returns the size of the receive buffer for ancillary messages (in bytes).void
setAncillaryReceiveBufferSize
(int size) Sets the size of the receive buffer for ancillary messages (in bytes).
-
Method Details
-
getAncillaryReceiveBufferSize
int getAncillaryReceiveBufferSize()Returns the size of the receive buffer for ancillary messages (in bytes).- Returns:
- The size.
-
setAncillaryReceiveBufferSize
void setAncillaryReceiveBufferSize(int size) Sets the size of the receive buffer for ancillary messages (in bytes). To disable handling ancillary messages, set it to 0 (default).- Parameters:
size
- The size.
-
ensureAncillaryReceiveBufferSize
void ensureAncillaryReceiveBufferSize(int minSize) Ensures a minimum ancillary receive buffer size.- Parameters:
minSize
- The minimum size (in bytes).
-