2 // MonoTests.Remoting.HttpCalls.cs
4 // Author: Lluis Sanchez Gual (lluis@ximian.com)
6 // 2003 (C) Copyright, Ximian, Inc.
10 using System.Collections;
11 using System.Runtime.Remoting;
12 using System.Runtime.Remoting.Channels;
13 using System.Runtime.Remoting.Channels.Http;
14 using NUnit.Framework;
16 namespace MonoTests.Remoting
19 public class HttpSyncCallTest : SyncCallTest
21 public override ChannelManager CreateChannelManager ()
23 return new HttpChannelManager ();
28 public class HttpAsyncCallTest : AsyncCallTest
30 public override ChannelManager CreateChannelManager ()
32 return new HttpChannelManager ();
37 public class HttpReflectionCallTest : ReflectionCallTest
39 public override ChannelManager CreateChannelManager ()
41 return new HttpChannelManager ();
46 public class HttpDelegateCallTest : DelegateCallTest
48 public override ChannelManager CreateChannelManager ()
50 return new HttpChannelManager ();
55 public class HttpBinarySyncCallTest : SyncCallTest
57 public override ChannelManager CreateChannelManager ()
59 return new HttpChannelManager ();
64 public class HttpChannelManager : ChannelManager
66 public override IChannelSender CreateClientChannel ()
68 Hashtable options = new Hashtable ();
69 options ["timeout"] = 10000; // 10s
70 return new HttpClientChannel (options, null);
73 public override IChannelReceiver CreateServerChannel ()
75 return new HttpChannel (0);
80 public class HttpBinaryChannelManager : ChannelManager
82 public override IChannelSender CreateClientChannel ()
84 Hashtable options = new Hashtable ();
85 options ["timeout"] = 10000; // 10s
86 options ["name"] = "binary http channel";
87 return new HttpClientChannel (options, new BinaryClientFormatterSinkProvider ());
90 public override IChannelReceiver CreateServerChannel ()
92 return new HttpChannel (0);