File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
src/main/java/io/github/sac Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ public class Socket extends Emitter {
3535 private Map <String , String > headers ;
3636 private SocketClusterCodec codec ;
3737 private int connectionTimeout = 5000 ;
38- private boolean perMessageDeflate ;
38+ private boolean perMessageDeflate = true ;
3939
4040 private static final ObjectMapper mapper = new ObjectMapper ();
4141
@@ -91,12 +91,19 @@ public void setCodec(SocketClusterCodec codec) {
9191 this .codec = codec ;
9292 }
9393
94+ /**
95+ * Set Websocket connection timeout - set to 5000 by default
96+ * @param timeout - connection timeout in Milliseconds
97+ */
9498 public void setConnectionTimeout (int timeout ) {
9599 connectionTimeout = timeout ;
96100 }
97101
98- public void setPerMessageDeflateCompression (boolean enable ) {
99- perMessageDeflate = enable ;
102+ /**
103+ * Disable Websocket perMessageDeflate compression, which is enabled by default
104+ */
105+ public void disablePerMessageDeflateCompression () {
106+ perMessageDeflate = false ;
100107 }
101108
102109 /**
You can’t perform that action at this time.
0 commit comments