-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #356 - expand idle timeouts #377
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -173,21 +173,63 @@ public interface Session extends Closeable { | |
|
||
/** | ||
* Return the number of milliseconds before this conversation may be closed by the container if it is inactive, i.e. | ||
* no messages are either sent or received in that time. | ||
* no messages are either sent or received in that time. A value that is zero or negative indicates that this | ||
* timeout will not be used. The read specific ({@link #getMaxReadIdleTimeout()} and/or write specific {@link | ||
* #getMaxWriteIdleTimeout()} timeouts may still apply. | ||
* | ||
* @return the timeout in milliseconds. | ||
*/ | ||
long getMaxIdleTimeout(); | ||
|
||
/** | ||
* Set the non-zero number of milliseconds before this session will be closed by the container if it is inactive, ie | ||
* no messages are either sent or received. A value that is 0 or negative indicates the session will never timeout | ||
* due to inactivity. | ||
* no messages are either sent or received. A value that is 0 or negative indicates that this timeout will not be | ||
* used. The read specific ({@link #getMaxReadIdleTimeout()} and/or write specific {@link #getMaxWriteIdleTimeout()} | ||
* timeouts may still apply. | ||
* | ||
* @param milliseconds the number of milliseconds. | ||
*/ | ||
void setMaxIdleTimeout(long milliseconds); | ||
|
||
/** | ||
* Return the number of milliseconds before this conversation may be closed by the container if no messages are | ||
* received in that time. A value that is zero or negative indicates that this timeout will not be used. The general | ||
* read/write ({@link #getMaxIdleTimeout()} and/or write specific {@link #getMaxWriteIdleTimeout()} timeouts may | ||
* still apply. | ||
* | ||
* @return the timeout in milliseconds. | ||
*/ | ||
long getMaxReadIdleTimeout(); | ||
|
||
/** | ||
* Set the non-zero number of milliseconds before this session will be closed by the container if no messages are | ||
* received. A value that is 0 or negative indicates that this timeout will not be used. The general read/write | ||
* ({@link #getMaxReadIdleTimeout()} and/or write specific {@link #getMaxWriteIdleTimeout()} timeouts may still | ||
* apply. | ||
* | ||
* @param milliseconds the number of milliseconds. | ||
*/ | ||
void setMaxReadIdleTimeout(long milliseconds); | ||
|
||
/** | ||
* Return the number of milliseconds before this conversation may be closed by the container if no messages are | ||
* sent in that time. A value that is zero or negative indicates that this timeout will not be used. The general | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sent by what? |
||
* read/write ({@link #getMaxIdleTimeout()} and/or read specific {@link #getMaxReadIdleTimeout()} timeouts may still | ||
* apply. | ||
* | ||
* @return the timeout in milliseconds. | ||
*/ | ||
long getMaxWriteIdleTimeout(); | ||
|
||
/** | ||
* Set the non-zero number of milliseconds before this session will be closed by the container if no messages are | ||
* sent. A value that is 0 or negative indicates that this timeout will not be used. The general read/write | ||
* ({@link #getMaxReadIdleTimeout()} and/or read specific {@link #getMaxReadIdleTimeout()} timeouts may still apply. | ||
* | ||
* @param milliseconds the number of milliseconds. | ||
*/ | ||
void setMaxWriteIdleTimeout(long milliseconds); | ||
|
||
/** | ||
* Sets the maximum length of incoming binary messages that this Session can buffer. | ||
* | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Complete message? (all data frames?)
Partial message? (some data frames? an incomplete data frame?)
Control frame?
Reset on receive of traffic?
Or reset on delivery of data frame? or any frame? or even auto-fragmented frame?
What if the connection has higher level activity not within websocket (eg: http/2 stream specific details, or http/3 stream specific details)?