forked from mongodb/docs-realm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add multiplexing and sync timeout options
- Loading branch information
1 parent
8fafa78
commit 4d93201
Showing
10 changed files
with
168 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
source/examples/generated/kotlin/AppClientTest.snippet.configure-app-client.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
source/examples/generated/kotlin/AppClientTest.snippet.enable-multiplexing-with-timeout.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
val configCustomLingerTime = AppConfiguration.Builder(YOUR_APP_ID) | ||
.enableSessionMultiplexing(true) | ||
.syncTimeouts { | ||
connectionLingerTime = 10.seconds // Overrides default 30 secs | ||
} | ||
.build() |
3 changes: 3 additions & 0 deletions
3
source/examples/generated/kotlin/AppClientTest.snippet.enable-multiplexing.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
val config = AppConfiguration.Builder(YOUR_APP_ID) | ||
.enableSessionMultiplexing(true) | ||
.build() |
9 changes: 9 additions & 0 deletions
9
source/examples/generated/kotlin/AppClientTest.snippet.sync-timeout-configuration.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
val config = AppConfiguration.Builder(YOUR_APP_ID) | ||
.syncTimeouts { | ||
connectTimeout = 1.minutes | ||
connectionLingerTime = 15.seconds | ||
pingKeepalivePeriod = 30.seconds | ||
pongKeepalivePeriod = 1.minutes | ||
fastReconnectLimit = 30.seconds | ||
} | ||
.build() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
source/examples/generated/kotlin/Serialization.snippet.call-function-stable-serializer.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
// The `getMailingAddress` function takes a first name and last name and returns an address as a BsonDocument | ||
val address = user.functions.call<BsonDocument>("getMailingAddress", "Bob", "Smith") | ||
|
||
assertEquals(address["street"], BsonString("123 Any Street")) |
4 changes: 3 additions & 1 deletion
4
source/examples/generated/kotlin/Serialization.snippet.define-serializable-class.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters