{
internal class PeerDuplexChannel : DuplexChannelBase
{
- PeerChannelFactory<IDuplexChannel> factory;
- PeerChannelListener<IDuplexChannel> listener;
+ PeerTransportBindingElement binding;
EndpointAddress local_address;
PeerResolver resolver;
PeerNode node;
public PeerDuplexChannel (PeerChannelFactory<IDuplexChannel> factory, EndpointAddress address, Uri via, PeerResolver resolver)
: base (factory, address, via)
{
- this.factory = factory;
- this.resolver = resolver;
+ binding = factory.Source;
+ this.resolver = factory.Resolver;
// It could be opened even with empty list of PeerNodeAddresses.
// So, do not create PeerNode per PeerNodeAddress, but do it with PeerNodeAddress[].
public PeerDuplexChannel (PeerChannelListener<IDuplexChannel> listener)
: base (listener)
{
- this.listener = listener;
-
+ binding = listener.Source;
+ this.resolver = listener.Resolver;
// FIXME: set resolver and node.
}
throw new NotImplementedException ();
}
- public override IAsyncResult BeginTryReceive (TimeSpan timeout, AsyncCallback callback, object state)
- {
- throw new NotImplementedException ();
- }
-
- public override bool EndTryReceive (IAsyncResult result, out Message message)
- {
- throw new NotImplementedException ();
- }
-
public override bool WaitForMessage (TimeSpan timeout)
{
throw new NotImplementedException ();
throw new NotImplementedException ();
}
- [MonoTODO]
- protected override IAsyncResult OnBeginClose (TimeSpan timeout,
- AsyncCallback callback, object state)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- protected override IAsyncResult OnBeginOpen (TimeSpan timeout,
- AsyncCallback callback, object state)
- {
- throw new NotImplementedException ();
- }
-
protected override void OnClose (TimeSpan timeout)
{
node.Close (timeout);
}
-
- [MonoTODO]
- protected override void OnEndClose (IAsyncResult result)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- protected override void OnEndOpen (IAsyncResult result)
- {
- throw new NotImplementedException ();
- }
// At some stage I should unify this class with PeerOutputChannel (and probably PeerInputChannel). Too much duplicate.
protected override void OnOpen (TimeSpan timeout)
{
internal class TcpChannelInfo
{
- public TcpChannelInfo (TcpTransportBindingElement element, MessageEncoder encoder, XmlDictionaryReaderQuotas readerQuotas)
+ public TcpChannelInfo (TransportBindingElement element, MessageEncoder encoder, XmlDictionaryReaderQuotas readerQuotas)
{
this.BindingElement = element;
this.MessageEncoder = encoder;
this.ReaderQuotas = readerQuotas ?? new XmlDictionaryReaderQuotas ();
}
- public TcpTransportBindingElement BindingElement { get; private set; }
+ public TransportBindingElement BindingElement { get; private set; }
public MessageEncoder MessageEncoder { get; private set; }