From 4cc4c3c9f1db40050c4bcb40fc3e22deca099efe Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Mon, 1 Oct 2007 23:47:02 +0000 Subject: [PATCH] Use the bare BlockingCommunicator in the PeerNode instead of the ClientCommunicator which does stuff like try to save its preferred connection port using the Java preference system (which is no longer available to server processes due to the removal of their home directories). git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4836 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/java/com/threerings/presents/peer/server/PeerNode.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/java/com/threerings/presents/peer/server/PeerNode.java b/src/java/com/threerings/presents/peer/server/PeerNode.java index d7e217e97..49d6cb33a 100644 --- a/src/java/com/threerings/presents/peer/server/PeerNode.java +++ b/src/java/com/threerings/presents/peer/server/PeerNode.java @@ -26,8 +26,10 @@ import java.util.Date; import com.samskivert.util.ResultListenerList; +import com.threerings.presents.client.BlockingCommunicator; import com.threerings.presents.client.Client; import com.threerings.presents.client.ClientObserver; +import com.threerings.presents.client.Communicator; import com.threerings.presents.server.PresentsServer; import com.threerings.presents.dobj.AttributeChangeListener; @@ -68,6 +70,11 @@ public class PeerNode // properly deal with it event.eventId = PresentsServer.omgr.getNextEventId(true); } + protected Communicator createCommunicator () { + // TODO: make a custom communicator that uses the ClientManager NIO system to do + // its I/O instead of using two threads and blocking socket I/O + return new BlockingCommunicator(this); + } }; _client.addClientObserver(this); }