@@ -12,15 +12,15 @@ NuGet https://www.nuget.org/packages/Network/ <br />
12
12
13
13
# Supported Frameworks
14
14
15
- - .NET Framework >= 4.5
15
+ - .NET Framework >= 4.6
16
16
- .NET Core* >= 2.0
17
17
- Mono* >= 5.4
18
18
- Xamarin.iOS* >= 10.14
19
19
- Xamarin.MAC* >= 3.8
20
20
- Xamarin.Android* >= 8.0
21
21
- UWP* >= 10.0.16299
22
22
23
- '* ' No Bluetooth and RSA support
23
+ '* ' No Bluetooth support
24
24
25
25
# Example Client
26
26
``` c#
@@ -163,7 +163,33 @@ NuGet https://www.nuget.org/packages/Network/ <br />
163
163
bluetoothConnection .Item2 .Send (new CalculationRequest (10 , 10 ), this );
164
164
}
165
165
```
166
+
167
+ # RSA Example
168
+ ``` c#
169
+ public async void Demo ()
170
+ {
171
+ // 1. Retrieve public key
172
+ string publicKey = File .ReadAllText (" PublicKey.xml" );
173
+ // 2. Retrieve private key
174
+ string privateKey = File .ReadAllText (" PrivateKey.xml" );
175
+ // 3. Establish a connection.
176
+ ClientConnectionContainer container = ConnectionFactory .CreateSecureClientConnectionContainer (" 127.0.0.1" , 1234 , publicKey , privateKey );
177
+ // 4. Register what happens if we get a connection
178
+ container .ConnectionEstablished += (connection , type ) =>
179
+ {
180
+ Console .WriteLine ($" {type .ToString ()} Connection established" );
181
+ // 5. Register what happens if we receive a packet of type "CalculationResponse"
182
+ connection .RegisterPacketHandler <CalculationResponse >((response , con ) => Console .WriteLine ($" Answer received {response .Result }" ), this );
183
+ // 6. Send a calculation request.
184
+ connection .Send (new CalculationRequest (10 , 10 ), this );
185
+ };
186
+ }
187
+ ```
166
188
167
189
# Logging
168
190
169
191
<img src =" http://www.indie-dev.at/wp-content/uploads/2016/11/Logging.gif " />
192
+
193
+ # Logging with RSA
194
+
195
+ <img src =" https://www.indie-dev.at/wp-content/uploads/2018/08/RSA.gif " />
0 commit comments