Class ProxyUDPConnection
java.lang.Object
uk.ac.manchester.spinnaker.connections.UDPConnection<Optional<ByteBuffer>>
uk.ac.manchester.spinnaker.alloc.proxy.ProxyUDPConnection
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- Connection
The low-level handler for proxy connections.
- Author:
- Donal Fellows
- 
Nested Class SummaryNested classes/interfaces inherited from class uk.ac.manchester.spinnaker.connections.UDPConnectionUDPConnection.TrafficClass
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidCore SpiNNaker message receive and dispatch-to-websocket loop.protected voideieioReceiverTask(Set<InetAddress> recvFrom) Core SpiNNaker message receive and dispatch-to-websocket loop for the type of connections required for EIEIO, especially for the live packet gatherer, which does a complex muxing and programs sockets/tags in a different way.receiveMessage(int timeout) voidsendMessage(ByteBuffer msg) Send a message on this connection.voidsendMessage(ByteBuffer msg, InetAddress addr, int port) Send a message on this connection.toString()protected voidWrites the count of messages sent and received on this connection to the log.Methods inherited from class uk.ac.manchester.spinnaker.connections.UDPConnectionclose, doReceive, doReceiveWithAddress, doSend, doSendTo, getLocalAddress, getLocalIPAddress, getLocalPort, getRemoteAddress, getRemoteIPAddress, getRemotePort, isClosed, isConnected, receive, receive, receiveMessage, receiveWithAddress, send, send, sendPortTriggerMessage, sendTo, sendTo, sendTo, setInUse, setNotInUse, setReceivePacketSizeMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface uk.ac.manchester.spinnaker.connections.model.ConnectionconvertTimeout
- 
Method Details- 
receiveMessage- Specified by:
- receiveMessagein class- UDPConnection<Optional<ByteBuffer>>
- Returns:
- The wrapped message bytes, or Optional.empty()if the socket timed out (not an error!)
- Throws:
- IOException
- InterruptedException
 
- 
sendMessageSend a message on this connection.- Parameters:
- msg- The message to send.
- Throws:
- IOException- If sending fails.
 
- 
sendMessageSend a message on this connection.- Parameters:
- msg- The message to send.
- addr- Where to send to.
- port- What port to send to.
- Throws:
- IOException- If sending fails.
 
- 
writeCountsToLogprotected void writeCountsToLog()Writes the count of messages sent and received on this connection to the log.
- 
toString- Overrides:
- toStringin class- UDPConnection<Optional<ByteBuffer>>
 
- 
connectedReceiverTaskprotected void connectedReceiverTask()Core SpiNNaker message receive and dispatch-to-websocket loop.
- 
eieioReceiverTaskCore SpiNNaker message receive and dispatch-to-websocket loop for the type of connections required for EIEIO, especially for the live packet gatherer, which does a complex muxing and programs sockets/tags in a different way.- Parameters:
- recvFrom- What hosts we are allowed to receive messages from. Messages from elsewhere will be discarded.
 
 
-