| | | 1 | | // Copyright (c) ZeroC, Inc. |
| | | 2 | | |
| | | 3 | | namespace Ice.SSL; |
| | | 4 | | |
| | | 5 | | internal sealed class ConnectorI : Ice.Internal.Connector |
| | | 6 | | { |
| | | 7 | | public Ice.Internal.Transceiver connect() => |
| | 1 | 8 | | new TransceiverI( |
| | 1 | 9 | | _instance, |
| | 1 | 10 | | _delegate.connect(), |
| | 1 | 11 | | _host, |
| | 1 | 12 | | incoming: false, |
| | 1 | 13 | | serverAuthenticationOptions: null); |
| | | 14 | | |
| | 0 | 15 | | public short type() => _delegate.type(); |
| | | 16 | | |
| | | 17 | | public override bool Equals(object obj) |
| | | 18 | | { |
| | 1 | 19 | | if (obj is not ConnectorI) |
| | | 20 | | { |
| | 0 | 21 | | return false; |
| | | 22 | | } |
| | | 23 | | |
| | 1 | 24 | | if (this == obj) |
| | | 25 | | { |
| | 1 | 26 | | return true; |
| | | 27 | | } |
| | | 28 | | |
| | 1 | 29 | | var p = (ConnectorI)obj; |
| | 1 | 30 | | return _delegate.Equals(p._delegate); |
| | | 31 | | } |
| | | 32 | | |
| | 1 | 33 | | public override int GetHashCode() => _delegate.GetHashCode(); |
| | | 34 | | |
| | 1 | 35 | | public override string ToString() => _delegate.ToString(); |
| | | 36 | | |
| | | 37 | | // Only for use by EndpointI. |
| | 1 | 38 | | internal ConnectorI(Instance instance, Ice.Internal.Connector del, string host) |
| | | 39 | | { |
| | 1 | 40 | | _instance = instance; |
| | 1 | 41 | | _delegate = del; |
| | 1 | 42 | | _host = host; |
| | 1 | 43 | | } |
| | | 44 | | |
| | | 45 | | private readonly Ice.Internal.Connector _delegate; |
| | | 46 | | private readonly string _host; |
| | | 47 | | private readonly Instance _instance; |
| | | 48 | | } |