Use a direct buffer for our overflow queue partial buffer as well because

there will be relatively few of those (at most one per client that is
experiencing lag) and while the client is experiencing lag we will be
trying to write their data once per pass through the sockets (which could
be hundreds of times a second) and we don't want each write attempt to
result in the creation of a temporary direct buffer.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3345 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2005-02-10 04:39:23 +00:00
parent 10e84f9471
commit 8f9af12fdb
@@ -1,5 +1,5 @@
//
// $Id: ConnectionManager.java,v 1.43 2004/08/27 02:20:24 mdb Exp $
// $Id$
//
// Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -716,7 +716,7 @@ public class ConnectionManager extends LoopingThread
public void handlePartialWrite (Connection conn, ByteBuffer buffer)
{
// set up our _partial buffer
_partial = ByteBuffer.allocate(buffer.remaining());
_partial = ByteBuffer.allocateDirect(buffer.remaining());
_partial.put(buffer);
_partial.flip();
}