Renamed methods to enable/disable masking to is/setMaskingEnabled().
This commit is contained in:
parent
a7a45bf7d9
commit
97cc150144
|
@ -71,7 +71,7 @@ import org.eclipse.jetty.websocket.WebSocketGeneratorD12.MaskGen;
|
|||
*/
|
||||
public class WebSocketClient extends AggregateLifeCycle
|
||||
{
|
||||
private final static Logger __log = org.eclipse.jetty.util.log.Log.getLogger(WebSocketClient.class.getCanonicalName());
|
||||
private final static Logger __log = org.eclipse.jetty.util.log.Log.getLogger(WebSocketClient.class.getName());
|
||||
private final static Random __random = new Random();
|
||||
private final static ByteArrayBuffer __ACCEPT = new ByteArrayBuffer.CaseInsensitive("Sec-WebSocket-Accept");
|
||||
|
||||
|
@ -89,7 +89,7 @@ public class WebSocketClient extends AggregateLifeCycle
|
|||
private int _maxIdleTime=-1;
|
||||
|
||||
private WebSocketBuffers _buffers;
|
||||
private boolean _nullMask;
|
||||
private boolean _maskingEnabled = true;
|
||||
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
@ -238,20 +238,20 @@ public class WebSocketClient extends AggregateLifeCycle
|
|||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @return True if a null mask is used.
|
||||
* @return whether masking is enabled.
|
||||
*/
|
||||
public boolean isNullMask()
|
||||
public boolean isMaskingEnabled()
|
||||
{
|
||||
return _nullMask;
|
||||
return _maskingEnabled;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
* @param maskGen
|
||||
* @param maskingEnabled whether to enable masking
|
||||
*/
|
||||
public void setNullMaskGen(boolean nullMask)
|
||||
public void setMaskingEnabled(boolean maskingEnabled)
|
||||
{
|
||||
_nullMask=nullMask;
|
||||
_maskingEnabled=maskingEnabled;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
@ -551,7 +551,7 @@ public class WebSocketClient extends AggregateLifeCycle
|
|||
else
|
||||
{
|
||||
Buffer header=_parser.getHeaderBuffer();
|
||||
MaskGen maskGen=_nullMask?new WebSocketGeneratorD12.FixedMaskGen():new WebSocketGeneratorD12.RandomMaskGen();
|
||||
MaskGen maskGen=_maskingEnabled?new WebSocketGeneratorD12.RandomMaskGen():new WebSocketGeneratorD12.FixedMaskGen();
|
||||
WebSocketConnectionD12 connection = new WebSocketConnectionD12(_holder.getWebSocket(),_endp,_buffers,System.currentTimeMillis(),_holder.getMaxIdleTime(),_holder.getProtocol(),null,10,maskGen);
|
||||
|
||||
if (header.hasContent())
|
||||
|
|
Loading…
Reference in New Issue