diff options
author | Carsten Weisse <[email protected]> | 2005-01-17 21:55:45 +0000 |
---|---|---|
committer | Carsten Weisse <[email protected]> | 2005-01-17 21:55:45 +0000 |
commit | 042f0a2c752194f36f9edbb46b9921e5daf881ee (patch) | |
tree | 1c665a0d67b4b6970e527946f69fdc5e4aab03c4 /src/jake2/qcommon/Netchan.java | |
parent | 1cb80475c53ba7e595dd65c3a32ff797b9a019b0 (diff) |
garbage optimized with static buffers
Diffstat (limited to 'src/jake2/qcommon/Netchan.java')
-rw-r--r-- | src/jake2/qcommon/Netchan.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/jake2/qcommon/Netchan.java b/src/jake2/qcommon/Netchan.java index 458bcbd..9f594ef 100644 --- a/src/jake2/qcommon/Netchan.java +++ b/src/jake2/qcommon/Netchan.java @@ -2,7 +2,7 @@ * NetChannel.java * Copyright (C) 2003 * - * $Id: Netchan.java,v 1.4 2004-09-22 19:22:09 salomo Exp $ + * $Id: Netchan.java,v 1.5 2005-01-17 21:55:45 cawe Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -118,6 +118,8 @@ public final class Netchan extends SV_MAIN { qport = Cvar.Get("qport", "" + port, Defines.CVAR_NOSET); } + private static final byte send_buf[] = new byte[Defines.MAX_MSGLEN]; + private static final sizebuf_t send = new sizebuf_t(); /* * =============== Netchan_OutOfBand * @@ -126,8 +128,6 @@ public final class Netchan extends SV_MAIN { //ok. public static void Netchan_OutOfBand(int net_socket, netadr_t adr, int length, byte data[]) { - sizebuf_t send = new sizebuf_t(); - byte send_buf[] = new byte[Defines.MAX_MSGLEN]; // write the packet header SZ.Init(send, send_buf, Defines.MAX_MSGLEN); @@ -194,6 +194,8 @@ public final class Netchan extends SV_MAIN { return send_reliable; } + // private static final byte send_buf[] = new byte[Defines.MAX_MSGLEN]; + // private static final sizebuf_t send = new sizebuf_t(); /* * =============== Netchan_Transmit * @@ -204,8 +206,6 @@ public final class Netchan extends SV_MAIN { * messages. ================ */ public static void Transmit(netchan_t chan, int length, byte data[]) { - sizebuf_t send = new sizebuf_t(); - byte send_buf[] = new byte[Defines.MAX_MSGLEN]; int send_reliable; int w1, w2; |