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 @@ -116,6 +116,11 @@ public interface IConnection: IDisposable
116
116
///(0 for disabled), in seconds.</summary>
117
117
ushort Heartbeat { get ; }
118
118
119
+ ///<summary>A dictionary of the server properties sent by the server
120
+ ///while establishing the connection. This typically includes
121
+ ///the product name and version of the server.</summary>
122
+ IDictionary ServerProperties { get ; }
123
+
119
124
///<summary>Returns the known hosts that came back from the
120
125
///broker in the connection.open-ok method at connection
121
126
///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 ;
@@ -250,6 +251,18 @@ public ushort Heartbeat
250
251
}
251
252
}
252
253
254
+ public IDictionary ServerProperties
255
+ {
256
+ get
257
+ {
258
+ return m_serverProperties ;
259
+ }
260
+ set
261
+ {
262
+ m_serverProperties = value ;
263
+ }
264
+ }
265
+
253
266
public AmqpTcpEndpoint [ ] KnownHosts
254
267
{
255
268
get { return m_knownHosts ; }
@@ -941,6 +954,8 @@ public void Open(bool insist)
941
954
ConnectionStartDetails connectionStart = ( ConnectionStartDetails )
942
955
connectionStartCell . Value ;
943
956
957
+ ServerProperties = connectionStart . m_serverProperties ;
958
+
944
959
AmqpVersion serverVersion = new AmqpVersion ( connectionStart . m_versionMajor ,
945
960
connectionStart . m_versionMinor ) ;
946
961
if ( ! serverVersion . Equals ( Protocol . Version ) )
You can’t perform that action at this time.
0 commit comments