adding constructors

This commit is contained in:
Jesse McConnell 2012-07-10 14:17:57 -05:00
parent 8d583045b3
commit b3d7dd4f1b
1 changed files with 10 additions and 0 deletions

View File

@ -45,6 +45,16 @@ public class WebSocketFrame implements Frame
return new WebSocketFrame(OpCode.BINARY).setPayload(buf);
}
public static WebSocketFrame ping()
{
return new WebSocketFrame(OpCode.PING);
}
public static WebSocketFrame pong()
{
return new WebSocketFrame(OpCode.PONG);
}
public static WebSocketFrame text()
{
return new WebSocketFrame(OpCode.TEXT);