IO.SocketOption: add require around TrafficClass range restrictions
This commit is contained in:
parent
ecf8469c75
commit
f7e1fbc11b
1 changed files with 4 additions and 1 deletions
|
|
@ -235,7 +235,10 @@ object IO {
|
|||
*
|
||||
* For more information see [[java.net.Socket#setTrafficClass]]
|
||||
*/
|
||||
case class TrafficClass(tc: Int) extends SocketOption
|
||||
case class TrafficClass(tc: Int) extends SocketOption {
|
||||
require(tc >= 0, "Traffic class must be >= 0")
|
||||
require(tc <= 255, "Traffic class must be <= 255")
|
||||
}
|
||||
|
||||
/**
|
||||
* Messages used to communicate with an [[akka.actor.IOManager]].
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue