Skip to content

Commit 4acebd1

Browse files
committed
Merge default into bug 21949
2 parents 46766aa + 727793e commit 4acebd1

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

projects/client/RabbitMQ.Client/src/client/api/IConnection.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@ public interface IConnection: IDisposable
120120
///server.</summary>
121121
IDictionary ClientProperties { get; }
122122

123+
///<summary>A dictionary of the server properties sent by the server
124+
///while establishing the connection. This typically includes
125+
///the product name and version of the server.</summary>
126+
IDictionary ServerProperties { get; }
127+
123128
///<summary>Returns the known hosts that came back from the
124129
///broker in the connection.open-ok method at connection
125130
///startup time. Null until the connection is completely open

projects/client/RabbitMQ.Client/src/client/impl/ConnectionBase.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ public abstract class ConnectionBase : IConnection
9494
public uint m_frameMax = 0;
9595
public ushort m_heartbeat = 0;
9696
public IDictionary m_clientProperties;
97+
public IDictionary m_serverProperties;
9798
public AmqpTcpEndpoint[] m_knownHosts = null;
9899

99100
public MainSession m_session0;
@@ -263,6 +264,18 @@ public IDictionary ClientProperties
263264
}
264265
}
265266

267+
public IDictionary ServerProperties
268+
{
269+
get
270+
{
271+
return m_serverProperties;
272+
}
273+
set
274+
{
275+
m_serverProperties = value;
276+
}
277+
}
278+
266279
public AmqpTcpEndpoint[] KnownHosts
267280
{
268281
get { return m_knownHosts; }
@@ -961,6 +974,8 @@ public void Open(bool insist)
961974
ConnectionStartDetails connectionStart = (ConnectionStartDetails)
962975
connectionStartCell.Value;
963976

977+
ServerProperties = connectionStart.m_serverProperties;
978+
964979
AmqpVersion serverVersion = new AmqpVersion(connectionStart.m_versionMajor,
965980
connectionStart.m_versionMinor);
966981
if (!serverVersion.Equals(Protocol.Version))

0 commit comments

Comments
 (0)