@@ -11,7 +11,7 @@ namespace WampSharp.V2
1111 public class DefaultWampChannelFactory : WampChannelFactory
1212 {
1313 private readonly JTokenMsgpackBinding mMsgpackBinding = new JTokenMsgpackBinding ( ) ;
14- private readonly JTokenJsonBinding mJsonBinding = new JTokenJsonBinding ( ) ;
14+ private readonly JTokenJsonBinding mJsonBinding = new JTokenJsonBinding ( ) ;
1515
1616 /// <summary>
1717 /// Creates a <see cref="IWampChannel"/> that connects to a given realm,
@@ -26,9 +26,29 @@ public IWampChannel CreateChannel<TMessage>(string address,
2626 IWampTextBinding < TMessage > binding )
2727 {
2828 var connection =
29- new WebSocket4NetTextConnection < TMessage > ( address , binding ) ;
30-
29+ new WebSocket4NetTextConnection < TMessage > ( address , binding ) ;
30+
3131 return this . CreateChannel ( realm , connection , binding ) ;
32+ }
33+
34+ /// <summary>
35+ /// Creates a <see cref="IWampChannel"/> that connects to a given realm,
36+ /// using the given address and the given text binding
37+ /// </summary>
38+ /// <param name="address">The given address.</param>
39+ /// <param name="realm">The given realm to connect to.</param>
40+ /// <param name="binding">The given text binding.</param>
41+ /// <param name="autenticator">The authenticator object to handle CHALLENGE request.</param>
42+ /// <returns></returns>
43+ public IWampChannel CreateChannel < TMessage > ( string address ,
44+ string realm ,
45+ IWampTextBinding < TMessage > binding ,
46+ IWampClientAutenticator autenticator )
47+ {
48+ var connection =
49+ new WebSocket4NetTextConnection < TMessage > ( address , binding ) ;
50+
51+ return this . CreateChannel ( realm , connection , binding , autenticator ) ;
3252 }
3353
3454 /// <summary>
@@ -44,11 +64,31 @@ public IWampChannel CreateChannel<TMessage>(string address,
4464 IWampBinaryBinding < TMessage > binding )
4565 {
4666 var connection =
47- new WebSocket4NetBinaryConnection < TMessage > ( address , binding ) ;
48-
67+ new WebSocket4NetBinaryConnection < TMessage > ( address , binding ) ;
68+
4969 return this . CreateChannel ( realm , connection , binding ) ;
5070 }
5171
72+ /// <summary>
73+ /// Creates a <see cref="IWampChannel"/> that connects to a given realm,
74+ /// using the given address and the given binary binding
75+ /// </summary>
76+ /// <param name="address">The given address.</param>
77+ /// <param name="realm">The given realm to connect to.</param>
78+ /// <param name="binding">The given binary binding.</param>
79+ /// <param name="autenticator">The authenticator object to handle CHALLENGE request.</param>
80+ /// <returns></returns>
81+ public IWampChannel CreateChannel < TMessage > ( string address ,
82+ string realm ,
83+ IWampBinaryBinding < TMessage > binding ,
84+ IWampClientAutenticator autenticator )
85+ {
86+ var connection =
87+ new WebSocket4NetBinaryConnection < TMessage > ( address , binding ) ;
88+
89+ return this . CreateChannel ( realm , connection , binding , autenticator ) ;
90+ }
91+
5292 /// <summary>
5393 /// Creates a <see cref="IWampChannel"/> that connects to a given realm,
5494 /// using the given address and json binding
@@ -62,6 +102,21 @@ public IWampChannel CreateJsonChannel(string address,
62102 return this . CreateChannel ( address , realm , mJsonBinding ) ;
63103 }
64104
105+ /// <summary>
106+ /// Creates a <see cref="IWampChannel"/> that connects to a given realm,
107+ /// using the given address and json binding
108+ /// </summary>
109+ /// <param name="address">The given address.</param>
110+ /// <param name="realm">The given realm to connect to.</param>
111+ /// <param name="autenticator">The authenticator object to handle CHALLENGE request.</param>
112+ /// <returns></returns>
113+ public IWampChannel CreateJsonChannel ( string address ,
114+ string realm ,
115+ IWampClientAutenticator autenticator )
116+ {
117+ return this . CreateChannel ( address , realm , mJsonBinding , autenticator ) ;
118+ }
119+
65120 /// <summary>
66121 /// Creates a <see cref="IWampChannel"/> that connects to a given realm,
67122 /// using the given address and msgpack binding
@@ -73,6 +128,21 @@ public IWampChannel CreateMsgpackChannel(string address,
73128 string realm )
74129 {
75130 return this . CreateChannel ( address , realm , mMsgpackBinding ) ;
131+ }
132+
133+ /// <summary>
134+ /// Creates a <see cref="IWampChannel"/> that connects to a given realm,
135+ /// using the given address and msgpack binding
136+ /// </summary>
137+ /// <param name="address">The given address.</param>
138+ /// <param name="realm">The given realm to connect to.</param>
139+ /// <param name="autenticator">The authenticator object to handle CHALLENGE request.</param>
140+ /// <returns></returns>
141+ public IWampChannel CreateMsgpackChannel ( string address ,
142+ string realm ,
143+ IWampClientAutenticator autenticator )
144+ {
145+ return this . CreateChannel ( address , realm , mMsgpackBinding , autenticator ) ;
76146 }
77147 }
78148}
0 commit comments