A small formatting change.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8937 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
c686efc3a7
commit
665a7c8851
@ -118,13 +118,12 @@ public class SelectorKernel extends AbstractKernel
|
|||||||
if( !reliable )
|
if( !reliable )
|
||||||
throw new UnsupportedOperationException( "Unreliable send not supported by this kernel." );
|
throw new UnsupportedOperationException( "Unreliable send not supported by this kernel." );
|
||||||
|
|
||||||
if( copy )
|
if( copy ) {
|
||||||
{
|
|
||||||
// Copy the data just once
|
// Copy the data just once
|
||||||
byte[] temp = new byte[data.remaining()];
|
byte[] temp = new byte[data.remaining()];
|
||||||
System.arraycopy(data.array(), data.position(), temp, 0, data.remaining());
|
System.arraycopy(data.array(), data.position(), temp, 0, data.remaining());
|
||||||
data = ByteBuffer.wrap(temp);
|
data = ByteBuffer.wrap(temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hand it to all of the endpoints that match our routing
|
// Hand it to all of the endpoints that match our routing
|
||||||
for( NioEndpoint p : endpoints.values() ) {
|
for( NioEndpoint p : endpoints.values() ) {
|
||||||
|
@ -126,13 +126,12 @@ public class UdpKernel extends AbstractKernel
|
|||||||
if( reliable )
|
if( reliable )
|
||||||
throw new UnsupportedOperationException( "Reliable send not supported by this kernel." );
|
throw new UnsupportedOperationException( "Reliable send not supported by this kernel." );
|
||||||
|
|
||||||
if( copy )
|
if( copy ) {
|
||||||
{
|
|
||||||
// Copy the data just once
|
// Copy the data just once
|
||||||
byte[] temp = new byte[data.remaining()];
|
byte[] temp = new byte[data.remaining()];
|
||||||
System.arraycopy(data.array(), data.position(), temp, 0, data.remaining());
|
System.arraycopy(data.array(), data.position(), temp, 0, data.remaining());
|
||||||
data = ByteBuffer.wrap(temp);
|
data = ByteBuffer.wrap(temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hand it to all of the endpoints that match our routing
|
// Hand it to all of the endpoints that match our routing
|
||||||
for( UdpEndpoint p : socketEndpoints.values() ) {
|
for( UdpEndpoint p : socketEndpoints.values() ) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user