File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
projects/client/RabbitMQ.Client/src/client Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,11 @@ public interface IConnection: IDisposable
120
120
///(0 for disabled), in seconds.</summary>
121
121
ushort Heartbeat { get ; }
122
122
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
+
123
128
///<summary>Returns the known hosts that came back from the
124
129
///broker in the connection.open-ok method at connection
125
130
///startup time. Null until the connection is completely open
Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ public abstract class ConnectionBase : IConnection
93
93
public IFrameHandler m_frameHandler ;
94
94
public uint m_frameMax = 0 ;
95
95
public ushort m_heartbeat = 0 ;
96
+ public IDictionary m_serverProperties ;
96
97
public AmqpTcpEndpoint [ ] m_knownHosts = null ;
97
98
98
99
public MainSession m_session0 ;
@@ -258,6 +259,18 @@ public ushort Heartbeat
258
259
}
259
260
}
260
261
262
+ public IDictionary ServerProperties
263
+ {
264
+ get
265
+ {
266
+ return m_serverProperties ;
267
+ }
268
+ set
269
+ {
270
+ m_serverProperties = value ;
271
+ }
272
+ }
273
+
261
274
public AmqpTcpEndpoint [ ] KnownHosts
262
275
{
263
276
get { return m_knownHosts ; }
@@ -949,6 +962,8 @@ public void Open(bool insist)
949
962
ConnectionStartDetails connectionStart = ( ConnectionStartDetails )
950
963
connectionStartCell . Value ;
951
964
965
+ ServerProperties = connectionStart . m_serverProperties ;
966
+
952
967
AmqpVersion serverVersion = new AmqpVersion ( connectionStart . m_versionMajor ,
953
968
connectionStart . m_versionMinor ) ;
954
969
if ( ! serverVersion . Equals ( Protocol . Version ) )
You can’t perform that action at this time.
0 commit comments