public UnityConnector(ThalamusConnector thalamusClient, int port) { _localPort = port; _remotePort = port + 1; _thalamusClient = thalamusClient; _dispatcherThread = new Thread(new ThreadStart(DispatcherThread)); _messageDispatcherThread = new Thread(new ThreadStart(MessageDispatcher)); _dispatcherThread.Start(); _messageDispatcherThread.Start(); _remoteUri = String.Format("http://{0}:{1}/", _remoteAddress, _remotePort); RPCProxy = XmlRpcProxyGen.Create <IFTRUnityCallerRpc>(); /*rpcProxy.Expect100Continue = true; * rpcProxy.KeepAlive = false;*/ RPCProxy.Timeout = 2000; RPCProxy.Url = _remoteUri; }
static void Main(string[] args) { ThalamusConnector thalamusCS; string character = ""; int port = 7000; if (args.Length != 2) { Console.WriteLine("Usage: " + Environment.GetCommandLineArgs()[0] + " <CharacterName> <PortNumber>"); return; } else { character = args[0]; port = Int16.Parse(args[1]); thalamusCS = new ThalamusConnector("RoboticPlayer", character); UnityConnector unityCS = new UnityConnector(thalamusCS, port); thalamusCS.UnityConnector = unityCS; Console.ReadLine(); thalamusCS.Dispose(); } }
public UnityListener(ThalamusConnector thalamusCS) { _thalamusCS = thalamusCS; }