forked from crossbario/autobahn-java
-
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.
Extend WAMP transports to be configurable (crossbario#385)
* Extend WAMP transports to be configurable * Update android dependencies
- Loading branch information
Showing
10 changed files
with
169 additions
and
73 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
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
64 changes: 64 additions & 0 deletions
64
autobahn/src/main/java/io/crossbar/autobahn/wamp/types/TransportOptions.java
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,64 @@ | ||
/////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// AutobahnJava - http://crossbar.io/autobahn | ||
// | ||
// Copyright (c) Crossbar.io Technologies GmbH and contributors | ||
// | ||
// Licensed under the MIT License. | ||
// http://www.opensource.org/licenses/mit-license.php | ||
// | ||
/////////////////////////////////////////////////////////////////////////////// | ||
|
||
package io.crossbar.autobahn.wamp.types; | ||
|
||
public class TransportOptions { | ||
private int mMaxFramePayloadSize; | ||
private int mAutoPingInterval; | ||
private int mAutoPingTimeout; | ||
|
||
public TransportOptions() { | ||
mMaxFramePayloadSize = 128 * 1024; | ||
mAutoPingInterval = 10; | ||
mAutoPingTimeout = 5; | ||
} | ||
|
||
/** | ||
* Set maximum frame payload size that will be accepted | ||
* when receiving. | ||
* <p> | ||
* DEFAULT: 4MB | ||
* | ||
* @param size Maximum size in octets for frame payload. | ||
*/ | ||
public void setMaxFramePayloadSize(int size) { | ||
if (size > 0) { | ||
mMaxFramePayloadSize = size; | ||
} | ||
} | ||
|
||
/** | ||
* Get maximum frame payload size that will be accepted | ||
* when receiving. | ||
* | ||
* @return Maximum size in octets for frame payload. | ||
*/ | ||
public int getMaxFramePayloadSize() { | ||
return mMaxFramePayloadSize; | ||
} | ||
|
||
public void setAutoPingInterval(int seconds) { | ||
mAutoPingInterval = seconds; | ||
} | ||
|
||
public int getAutoPingInterval() { | ||
return mAutoPingInterval; | ||
} | ||
|
||
public void setAutoPingTimeout(int seconds) { | ||
mAutoPingTimeout = seconds; | ||
} | ||
|
||
public int getAutoPingTimeout() { | ||
return mAutoPingTimeout; | ||
} | ||
} |
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
Oops, something went wrong.