org.mpisws.p2p.transport.wire
Class UDPLayerImpl
java.lang.Object
rice.selector.SelectionKeyHandler
org.mpisws.p2p.transport.wire.UDPLayerImpl
- All Implemented Interfaces:
- UDPLayer, Destructable
public class UDPLayerImpl
- extends SelectionKeyHandler
- implements UDPLayer
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OPTIONS
public static final Map<String,Object> OPTIONS
DATAGRAM_RECEIVE_BUFFER_SIZE
public int DATAGRAM_RECEIVE_BUFFER_SIZE
DATAGRAM_SEND_BUFFER_SIZE
public int DATAGRAM_SEND_BUFFER_SIZE
UDPLayerImpl
public UDPLayerImpl(WireTransportLayerImpl wire)
throws IOException
- Throws:
IOException
sendMessage
public MessageRequestHandle<InetSocketAddress,ByteBuffer> sendMessage(InetSocketAddress destination,
ByteBuffer msg,
MessageCallback<InetSocketAddress,ByteBuffer> deliverAckToMe,
Map<String,Object> options)
- The ack is not the end to end, it's called when actually sent
- Specified by:
sendMessage in interface UDPLayer
- Parameters:
destination - m - deliverAckToMe - ack is when the message is sent to the wire
openServerSocket
protected void openServerSocket()
throws IOException
- Throws:
IOException
read
public void read(SelectionKey key)
- DESCRIBE THE METHOD
- Overrides:
read in class SelectionKeyHandler
- Parameters:
key - DESCRIBE THE PARAMETER
readHeader
protected void readHeader(InetSocketAddress address)
throws IOException
- Throws:
IOException
write
public void write(SelectionKey key)
- DESCRIBE THE METHOD
- Overrides:
write in class SelectionKeyHandler
- Parameters:
key - DESCRIBE THE PARAMETER
modifyKey
public void modifyKey(SelectionKey key)
- DESCRIBE THE METHOD
- Overrides:
modifyKey in class SelectionKeyHandler
- Parameters:
key - DESCRIBE THE PARAMETER
destroy
public void destroy()
- Specified by:
destroy in interface Destructable
acceptMessages
public void acceptMessages(boolean b)
- Specified by:
acceptMessages in interface UDPLayer
Copyright © 2010. All Rights Reserved.