org.eclipse.jetty.websocket
Class WebSocketGeneratorRFC6455
java.lang.Object
org.eclipse.jetty.websocket.WebSocketGeneratorRFC6455
- All Implemented Interfaces:
- WebSocketGenerator
public class WebSocketGeneratorRFC6455
- extends Object
- implements WebSocketGenerator
WebSocketGenerator.
This class generates websocket packets.
It is fully synchronized because it is likely that async
threads will call the addMessage methods while other
threads are flushing the generator.
WebSocketGeneratorRFC6455
public WebSocketGeneratorRFC6455(WebSocketBuffers buffers,
EndPoint endp)
WebSocketGeneratorRFC6455
public WebSocketGeneratorRFC6455(WebSocketBuffers buffers,
EndPoint endp,
MaskGen maskGen)
getBuffer
public Buffer getBuffer()
addFrame
public void addFrame(byte flags,
byte opcode,
byte[] content,
int offset,
int length)
throws IOException
- Specified by:
addFrame
in interface WebSocketGenerator
- Throws:
IOException
flushBuffer
public int flushBuffer()
throws IOException
- Throws:
IOException
flush
public int flush()
throws IOException
- Specified by:
flush
in interface WebSocketGenerator
- Throws:
IOException
isBufferEmpty
public boolean isBufferEmpty()
- Specified by:
isBufferEmpty
in interface WebSocketGenerator
returnBuffer
public void returnBuffer()
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.