* TcpClientChannel.cs: Set eol-style to native.
authorGert Driesen <drieseng@users.sourceforge.net>
Wed, 31 May 2006 08:46:36 +0000 (08:46 -0000)
committerGert Driesen <drieseng@users.sourceforge.net>
Wed, 31 May 2006 08:46:36 +0000 (08:46 -0000)
* TcpChannel.cs: Fixed line endings. Set eol-style to native.
* TcpServerTransportSink.cs: Fixed line endings. Set eol-style to
native.
* TcpConnectionPool.cs: Fixed line endings. Set eol-style to CRLF.
* TcpClientTransportSinkProvider.cs: Fixed line endings. Set eol-style
to native.
* TcpMessageIO.cs: Set eol-style to native.
* TcpServerChannel.cs: Fixed line endings. Set eol-style to native.
* TcpClientTransportSink.cs: Fixed line endings. Set eol-style to
native.

svn path=/trunk/mcs/; revision=61302

mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/ChangeLog
mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpChannel.cs
mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpClientTransportSink.cs
mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpClientTransportSinkProvider.cs
mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpConnectionPool.cs
mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.cs
mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpServerTransportSink.cs

index fa40f63579b1a4a0de43ec1a1ac9cac31233ab59..365d337458d0d6602a89063070d45c73ebb040ce 100644 (file)
@@ -1,3 +1,17 @@
+2006-05-31  Gert Driesen  <drieseng@users.sourceforge.net>
+
+       * TcpClientChannel.cs: Set eol-style to native.
+       * TcpChannel.cs: Fixed line endings. Set eol-style to native.
+       * TcpServerTransportSink.cs: Fixed line endings. Set eol-style to
+       native.
+       * TcpConnectionPool.cs: Fixed line endings. Set eol-style to CRLF.
+       * TcpClientTransportSinkProvider.cs: Fixed line endings. Set eol-style
+       to native.
+       * TcpMessageIO.cs: Set eol-style to native.
+       * TcpServerChannel.cs: Fixed line endings. Set eol-style to native.
+       * TcpClientTransportSink.cs: Fixed line endings. Set eol-style to
+       native.
+
 2005-11-08  Lluis Sanchez Gual  <lluis@novell.com> 
 
        * TcpServerChannel.cs: Fix null ref exception.
index d9f6b62865ef306c736b8675bb143782bd944c15..de8d9a692fcb357239ea3b46c9c8d9c29fed43a1 100644 (file)
@@ -36,37 +36,37 @@ namespace System.Runtime.Remoting.Channels.Tcp
 {
        public class TcpChannel : IChannelReceiver, IChannel, IChannelSender
        {
-               private TcpClientChannel _clientChannel;\r
-               private TcpServerChannel _serverChannel = null;\r
-               private string _name = "tcp";\r
+               private TcpClientChannel _clientChannel;
+               private TcpServerChannel _serverChannel = null;
+               private string _name = "tcp";
                private int _priority = 1;
        
                public TcpChannel ()
         {
-                       Init (new Hashtable(), null, null);\r
+                       Init (new Hashtable(), null, null);
                }
 
                public TcpChannel (int port)
                {
-                       Hashtable ht = new Hashtable();\r
-                       ht["port"] = port.ToString();\r
-                       Init(ht, null, null);\r
+                       Hashtable ht = new Hashtable();
+                       ht["port"] = port.ToString();
+                       Init(ht, null, null);
                }
 
-               void Init (IDictionary properties, IClientChannelSinkProvider clientSink, IServerChannelSinkProvider serverSink)\r
-               {\r
-                       _clientChannel = new TcpClientChannel (properties,clientSink);\r
+               void Init (IDictionary properties, IClientChannelSinkProvider clientSink, IServerChannelSinkProvider serverSink)
+               {
+                       _clientChannel = new TcpClientChannel (properties,clientSink);
+
+                       if(properties["port"] != null)
+                               _serverChannel = new TcpServerChannel(properties, serverSink);
 
-                       if(properties["port"] != null)\r
-                               _serverChannel = new TcpServerChannel(properties, serverSink);\r
-\r
                        object val = properties ["name"];
                        if (val != null) _name = val as string;
                        
                        val = properties ["priority"];
                        if (val != null) _priority = Convert.ToInt32 (val);
-               }\r
-\r
+               }
+
 
                public TcpChannel (IDictionary properties,
                                   IClientChannelSinkProvider clientSinkProvider,
@@ -75,46 +75,46 @@ namespace System.Runtime.Remoting.Channels.Tcp
                        Init (properties, clientSinkProvider, serverSinkProvider);
                }
 
-               public IMessageSink CreateMessageSink(string url, object remoteChannelData, out string objectURI)\r
-               {\r
-                       return _clientChannel.CreateMessageSink(url, remoteChannelData, out objectURI);\r
-               }\r
-\r
-               public string ChannelName\r
-               {\r
-                       get { return _name; }\r
-               }\r
-\r
-               public int ChannelPriority\r
-               {\r
-                       get { return _priority; }\r
-               }\r
-\r
-               public void StartListening (object data)\r
-               {\r
-                       if (_serverChannel != null) _serverChannel.StartListening (data);\r
-               }\r
-               \r
-               public void StopListening (object data)\r
-               {\r
-                       if (_serverChannel != null) _serverChannel.StopListening(data);\r
-                       TcpConnectionPool.Shutdown ();\r
-               }\r
-\r
-               public string[] GetUrlsForUri (string uri)\r
-               {\r
-                       if (_serverChannel != null) return _serverChannel.GetUrlsForUri(uri);\r
-                       else return null;\r
-               }\r
-\r
-               public object ChannelData\r
-               {\r
-                       get \r
-                       {\r
-                               if (_serverChannel != null) return _serverChannel.ChannelData;\r
-                               else return null;\r
-                       }\r
-               }\r
+               public IMessageSink CreateMessageSink(string url, object remoteChannelData, out string objectURI)
+               {
+                       return _clientChannel.CreateMessageSink(url, remoteChannelData, out objectURI);
+               }
+
+               public string ChannelName
+               {
+                       get { return _name; }
+               }
+
+               public int ChannelPriority
+               {
+                       get { return _priority; }
+               }
+
+               public void StartListening (object data)
+               {
+                       if (_serverChannel != null) _serverChannel.StartListening (data);
+               }
+               
+               public void StopListening (object data)
+               {
+                       if (_serverChannel != null) _serverChannel.StopListening(data);
+                       TcpConnectionPool.Shutdown ();
+               }
+
+               public string[] GetUrlsForUri (string uri)
+               {
+                       if (_serverChannel != null) return _serverChannel.GetUrlsForUri(uri);
+                       else return null;
+               }
+
+               public object ChannelData
+               {
+                       get 
+                       {
+                               if (_serverChannel != null) return _serverChannel.ChannelData;
+                               else return null;
+                       }
+               }
 
                public string Parse (string url, out string objectURI)
                {
index f6f482bb68129a6f0f1d0f374b045978699529c5..ddd08e6a8bf598f65b511a84818abb9b2a122e10 100644 (file)
@@ -5,7 +5,7 @@
 //         Lluis Sanchez Gual (lluis@ideary.com)
 //
 // 2002 (C) Copyright, Ximian, Inc.
-//\r
+//
 
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
-\r
-using System;\r
-using System.Runtime.Remoting.Channels;\r
-using System.Runtime.Remoting.Messaging;\r
-using System.Collections;\r
-using System.IO;\r
-using System.Threading;\r
-\r
-namespace System.Runtime.Remoting.Channels.Tcp\r
-{\r
+
+using System;
+using System.Runtime.Remoting.Channels;
+using System.Runtime.Remoting.Messaging;
+using System.Collections;
+using System.IO;
+using System.Threading;
+
+namespace System.Runtime.Remoting.Channels.Tcp
+{
        internal class TcpClientTransportSink : IClientChannelSink
        {
                string _host;
@@ -50,7 +50,7 @@ namespace System.Runtime.Remoting.Channels.Tcp
 
                public IDictionary Properties
                {
-                       get \r
+                       get 
                        {
                                return null;
                        }
@@ -58,7 +58,7 @@ namespace System.Runtime.Remoting.Channels.Tcp
 
                public IClientChannelSink NextChannelSink
                {
-                       get \r
+                       get 
                        {
                                // we are the last one
                                return null;
@@ -185,5 +185,5 @@ namespace System.Runtime.Remoting.Channels.Tcp
 
        }
 
-\r
-}\r
+
+}
index fa10a0cb486e9ab3eab6ae83f37c775fae9d11e0..9fd95773f5b45efe92ab31a17e3d77b8e25000bb 100644 (file)
@@ -5,7 +5,7 @@
 //         Lluis Sanchez (lsg@ctv.es)
 //
 // 2002 (C) Copyright, Ximian, Inc.
-//\r
+//
 
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
-\r
-using System;\r
-using System.Runtime.Remoting.Channels;\r
-\r
-namespace System.Runtime.Remoting.Channels.Tcp\r
-{\r
+
+using System;
+using System.Runtime.Remoting.Channels;
+
+namespace System.Runtime.Remoting.Channels.Tcp
+{
        internal class TcpClientTransportSinkProvider : IClientChannelSinkProvider
        {
                public TcpClientTransportSinkProvider ()
@@ -42,12 +42,12 @@ namespace System.Runtime.Remoting.Channels.Tcp
 
                public IClientChannelSinkProvider Next
                {
-                       get \r
+                       get 
                        {
                                return null;
                        }
 
-                       set \r
+                       set 
                        {
                                // ignore, we are always the last in the chain 
                        }
@@ -58,5 +58,5 @@ namespace System.Runtime.Remoting.Channels.Tcp
                {
                        return new TcpClientTransportSink (url);
                }
-       }\r
-}\r
+       }
+}
index 39c6215f886831352475bf7620856c00e3711d21..4628d70bc6ec291f9a79a587175ef24b1e33df36 100644 (file)
@@ -5,27 +5,27 @@
 //\r
 // 2002 (C) Lluis Sanchez Gual\r
 //\r
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
+\r
+//\r
+// Permission is hereby granted, free of charge, to any person obtaining\r
+// a copy of this software and associated documentation files (the\r
+// "Software"), to deal in the Software without restriction, including\r
+// without limitation the rights to use, copy, modify, merge, publish,\r
+// distribute, sublicense, and/or sell copies of the Software, and to\r
+// permit persons to whom the Software is furnished to do so, subject to\r
+// the following conditions:\r
+// \r
+// The above copyright notice and this permission notice shall be\r
+// included in all copies or substantial portions of the Software.\r
+// \r
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
+//\r
 \r
 using System;\r
 using System.Collections;\r
@@ -311,4 +311,4 @@ namespace System.Runtime.Remoting.Channels.Tcp
        }\r
 \r
 \r
-}
+}\r
index c5a87259c2c51463e2b316c89ea2911ad1e0cafb..b51a3198eaaccec1fb526f13acb72403443fa64d 100644 (file)
@@ -62,7 +62,7 @@ namespace System.Runtime.Remoting.Channels.Tcp
 
                void Init (IServerChannelSinkProvider serverSinkProvider) 
                {
-                       if (serverSinkProvider == null) \r
+                       if (serverSinkProvider == null) 
                        {
                                serverSinkProvider = new BinaryServerFormatterSinkProvider ();
                        }
@@ -84,16 +84,16 @@ namespace System.Runtime.Remoting.Channels.Tcp
                        // Gets channel data from the chain of channel providers
 
                        channel_data = new ChannelDataStore (null);
-                       IServerChannelSinkProvider provider = serverSinkProvider;\r
-                       while (provider != null)\r
-                       {\r
-                               provider.GetChannelData(channel_data);\r
-                               provider = provider.Next;\r
-                       }\r
+                       IServerChannelSinkProvider provider = serverSinkProvider;
+                       while (provider != null)
+                       {
+                               provider.GetChannelData(channel_data);
+                               provider = provider.Next;
+                       }
 
                        // Creates the sink chain that will process all incoming messages
 
-                       IServerChannelSink next_sink = ChannelServices.CreateServerChannelSinkChain (serverSinkProvider, this);\r
+                       IServerChannelSink next_sink = ChannelServices.CreateServerChannelSinkChain (serverSinkProvider, this);
                        sink = new TcpServerTransportSink (next_sink);
                }
                
@@ -107,35 +107,35 @@ namespace System.Runtime.Remoting.Channels.Tcp
                                         IServerChannelSinkProvider serverSinkProvider)
                {
                        foreach(DictionaryEntry property in properties)
-                       {\r
-                               switch((string)property.Key)\r
-                               {\r
+                       {
+                               switch((string)property.Key)
+                               {
                                        case "name":
                                                name = property.Value.ToString();
                                                break;
-                                       case "port":\r
+                                       case "port":
                                                port = Convert.ToInt32(property.Value);
-                                               break;\r
-                                       case "priority":\r
+                                               break;
+                                       case "priority":
                                                priority = Convert.ToInt32(property.Value);
-                                               break;\r
-                                       case "bindTo":\r
+                                               break;
+                                       case "bindTo":
                                                bindAddress = IPAddress.Parse((string)property.Value);
-                                               break;\r
-                                       case "rejectRemoteRequests":\r
+                                               break;
+                                       case "rejectRemoteRequests":
                                                if(Convert.ToBoolean(properties["rejectRemoteRequests"]))
                                                        bindAddress = IPAddress.Loopback;
                                                break;
                                        case "supressChannelData":
                                                supressChannelData = Convert.ToBoolean (property.Value);
-                                               break;\r
+                                               break;
                                        case "useIpAddress":
                                                useIpAddress = Convert.ToBoolean (property.Value);
                                                break;
                                        case "machineName":
                                                host = property.Value as string;
                                                break;
-                               }\r
+                               }
                        }                       
                        Init (serverSinkProvider);
                }
@@ -182,18 +182,18 @@ namespace System.Runtime.Remoting.Channels.Tcp
                        return "tcp://" + host + ":" + port;
                }
                
-               public string[] GetUrlsForUri (string uri)\r
-               {\r
+               public string[] GetUrlsForUri (string uri)
+               {
                        if (!uri.StartsWith ("/")) uri = "/" + uri;
-\r
-                       string [] chnl_uris = channel_data.ChannelUris;\r
-                       string [] result = new String [chnl_uris.Length];\r
-\r
-                       for (int i = 0; i < chnl_uris.Length; i++) \r
-                               result [i] = chnl_uris [i] + uri;\r
-                       \r
-                       return result;\r
-               }\r
+
+                       string [] chnl_uris = channel_data.ChannelUris;
+                       string [] result = new String [chnl_uris.Length];
+
+                       for (int i = 0; i < chnl_uris.Length; i++) 
+                               result [i] = chnl_uris [i] + uri;
+                       
+                       return result;
+               }
 
                public string Parse (string url, out string objectURI)
                {
@@ -237,7 +237,7 @@ namespace System.Runtime.Remoting.Channels.Tcp
                        stopped = false;
 #endif 
                        listener = new TcpListener (bindAddress, port);
-                       if (server_thread == null) \r
+                       if (server_thread == null) 
                        {
                                threadPool = RemotingThreadPool.GetSharedPool ();
                                listener.Start ();
@@ -270,8 +270,8 @@ namespace System.Runtime.Remoting.Channels.Tcp
 #endif
                        listener.Stop ();
                        threadPool.Free ();
-                       server_thread.Join ();\r
-                       server_thread = null;                   \r
+                       server_thread.Join ();
+                       server_thread = null;                   
                }
        }
 
index 44a3c8274fba4edf3ef3408c6b67c690a1b92657..0cdd8cd4b59802d8295a85ecdc8c50361b94a785 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-using System;\r
-using System.Collections;\r
-using System.Runtime.Remoting.Messaging;\r
-using System.IO;\r
-\r
-namespace System.Runtime.Remoting.Channels.Tcp\r
-{\r
+using System;
+using System.Collections;
+using System.Runtime.Remoting.Messaging;
+using System.IO;
+
+namespace System.Runtime.Remoting.Channels.Tcp
+{
        internal class TcpServerTransportSink : IServerChannelSink, IChannelSinkBase
        {
                IServerChannelSink next_sink;
@@ -44,17 +44,17 @@ namespace System.Runtime.Remoting.Channels.Tcp
                        next_sink = next;
                }
                
-               public IServerChannelSink NextChannelSink \r
+               public IServerChannelSink NextChannelSink 
                {
-                       get \r
+                       get 
                        {
                                return next_sink;
                        }
                }
 
-               public IDictionary Properties \r
+               public IDictionary Properties 
                {
-                       get \r
+                       get 
                        {
                                if (next_sink != null) return next_sink.Properties;
                                else return null;
@@ -65,7 +65,7 @@ namespace System.Runtime.Remoting.Channels.Tcp
                        IMessage msg, ITransportHeaders headers, Stream responseStream)
                {
                        ClientConnection connection = (ClientConnection)state;
-                       TcpMessageIO.SendMessageStream (connection.Stream, responseStream, headers, connection.Buffer);\r
+                       TcpMessageIO.SendMessageStream (connection.Stream, responseStream, headers, connection.Buffer);
                }
 
                public Stream GetResponseStream (IServerResponseChannelSinkStack sinkStack, object state,
@@ -91,7 +91,7 @@ namespace System.Runtime.Remoting.Channels.Tcp
                        // Reads the headers and the request stream
 
                        Stream requestStream;
-                       ITransportHeaders requestHeaders;\r
+                       ITransportHeaders requestHeaders;
 
                        requestStream = TcpMessageIO.ReceiveMessageStream (connection.Stream, out requestHeaders, connection.Buffer);
                        requestHeaders [CommonTransportKeys.IPAddress] = connection.ClientAddress;
@@ -102,30 +102,30 @@ namespace System.Runtime.Remoting.Channels.Tcp
                        
                        if (uri != null)
                                requestHeaders [CommonTransportKeys.RequestUri] = uri;
-                       \r
-                       // Pushes the connection object together with the sink. This information\r
-                       // will be used for sending the response in an async call.\r
-\r
-                       ServerChannelSinkStack sinkStack = new ServerChannelSinkStack();\r
-                       sinkStack.Push(this, connection);\r
-\r
-                       ITransportHeaders responseHeaders;\r
-                       Stream responseStream;\r
-                       IMessage responseMsg;\r
-
-                       ServerProcessing proc = next_sink.ProcessMessage(sinkStack, null, requestHeaders, requestStream, out responseMsg, out responseHeaders, out responseStream);\r
-\r
-                       switch (proc)\r
-                       {\r
-                               case ServerProcessing.Complete:\r
-                                       TcpMessageIO.SendMessageStream (connection.Stream, responseStream, responseHeaders, connection.Buffer);\r
-                                       break;\r
-\r
-                               case ServerProcessing.Async:\r
-                               case ServerProcessing.OneWay:\r
-                                       break;\r
-                       }\r
+                       
+                       // Pushes the connection object together with the sink. This information
+                       // will be used for sending the response in an async call.
+
+                       ServerChannelSinkStack sinkStack = new ServerChannelSinkStack();
+                       sinkStack.Push(this, connection);
+
+                       ITransportHeaders responseHeaders;
+                       Stream responseStream;
+                       IMessage responseMsg;
+
+                       ServerProcessing proc = next_sink.ProcessMessage(sinkStack, null, requestHeaders, requestStream, out responseMsg, out responseHeaders, out responseStream);
+
+                       switch (proc)
+                       {
+                               case ServerProcessing.Complete:
+                                       TcpMessageIO.SendMessageStream (connection.Stream, responseStream, responseHeaders, connection.Buffer);
+                                       break;
+
+                               case ServerProcessing.Async:
+                               case ServerProcessing.OneWay:
+                                       break;
+                       }
                }
-       }\r
-}\r
-\r
+       }
+}
+