From 9d1b42c39a779c84dd091a817d2f6e5f434777c4 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Tue, 25 Mar 2008 03:49:08 +0000 Subject: Comment out unused private methods. --- .../Communications/RestClient/RestClient.cs | 101 +++++++++++---------- 1 file changed, 52 insertions(+), 49 deletions(-) (limited to 'OpenSim/Framework/Communications/RestClient') diff --git a/OpenSim/Framework/Communications/RestClient/RestClient.cs b/OpenSim/Framework/Communications/RestClient/RestClient.cs index 7212e5e..1178fed 100644 --- a/OpenSim/Framework/Communications/RestClient/RestClient.cs +++ b/OpenSim/Framework/Communications/RestClient/RestClient.cs @@ -195,15 +195,16 @@ namespace OpenSim.Framework.Communications return s.Substring(s.Length - 1, 1) == "/"; } - /// - /// return a slash or blank. A slash will be returned if the string does not contain one - /// - /// stromg to be examined - /// slash '/' if not already present - private string slash(string s) - { - return isSlashed(s) ? String.Empty : "/"; - } +// TODO: unused +// /// +// /// return a slash or blank. A slash will be returned if the string does not contain one +// /// +// /// stromg to be examined +// /// slash '/' if not already present +// private string slash(string s) +// { +// return isSlashed(s) ? String.Empty : "/"; +// } /// /// Build a Uri based on the initial Url, path elements and parameters @@ -278,46 +279,48 @@ namespace OpenSim.Framework.Communications } } - /// - /// Async method, invoked when the initial response if received from the server - /// - /// - private void ResponseIsReadyDelegate(IAsyncResult ar) - { - try - { - // grab response - WebRequest wr = (WebRequest) ar.AsyncState; - _response = (HttpWebResponse) wr.EndGetResponse(ar); - - // get response stream, and setup async reading - Stream s = _response.GetResponseStream(); - IAsyncResult asynchronousResult = - s.BeginRead(_readbuf, 0, BufferSize, new AsyncCallback(StreamIsReadyDelegate), s); - - // TODO! Implement timeout, without killing the server - // wait until completed, or we timed out - // ThreadPool.RegisterWaitForSingleObject(asynchronousResult.AsyncWaitHandle, new WaitOrTimerCallback(TimeoutCallback), _request, DefaultTimeout, true); - } - catch (Exception e) - { - _allDone.Set(); - _asyncException = e; - } - } - - // Abort the request if the timer fires. - private static void TimeoutCallback(object state, bool timedOut) - { - if (timedOut) - { - HttpWebRequest request = state as HttpWebRequest; - if (request != null) - { - request.Abort(); - } - } - } +// TODO: unused +// /// +// /// Async method, invoked when the initial response if received from the server +// /// +// /// +// private void ResponseIsReadyDelegate(IAsyncResult ar) +// { +// try +// { +// // grab response +// WebRequest wr = (WebRequest) ar.AsyncState; +// _response = (HttpWebResponse) wr.EndGetResponse(ar); + +// // get response stream, and setup async reading +// Stream s = _response.GetResponseStream(); +// IAsyncResult asynchronousResult = +// s.BeginRead(_readbuf, 0, BufferSize, new AsyncCallback(StreamIsReadyDelegate), s); + +// // TODO! Implement timeout, without killing the server +// // wait until completed, or we timed out +// // ThreadPool.RegisterWaitForSingleObject(asynchronousResult.AsyncWaitHandle, new WaitOrTimerCallback(TimeoutCallback), _request, DefaultTimeout, true); +// } +// catch (Exception e) +// { +// _allDone.Set(); +// _asyncException = e; +// } +// } + +// TODO: unused +// // Abort the request if the timer fires. +// private static void TimeoutCallback(object state, bool timedOut) +// { +// if (timedOut) +// { +// HttpWebRequest request = state as HttpWebRequest; +// if (request != null) +// { +// request.Abort(); +// } +// } +// } #endregion Async communications with server -- cgit v1.1