C# Class Tmds.SockJS.MessageWriter

显示文件 Open project: tmds/Tmds.SockJS Class Usage Examples

Public Methods

Method Description
CreateCloseBuffer ( WebSocketCloseStatus status, string description ) : byte[]
CreateCloseMessage ( ReceiverType type, byte closeArray ) : ArraySegment
CreateSendsMessage ( ReceiverType type, List sends ) : ArraySegment
CreateSockJSWebSocketSendMessage ( ArraySegment buffer ) : ArraySegment

Private Methods

Method Description
GetSegment ( ) : ArraySegment
MessageWriter ( ) : System
ToArray ( ) : byte[]
WriteArrayEnd ( ) : void
WriteArrayNext ( ) : void
WriteArrayStart ( ) : void
WriteBytes ( byte bytes ) : void
WriteChar ( char c ) : void
WriteCloseMessage ( WebSocketCloseStatus status, string description ) : void
WriteInt ( int i ) : void
WriteJsonString ( ArraySegment segment ) : void
WriteNewline ( ) : void
WriteSends ( List sends ) : void
WriteSockJSWebSocketSend ( ArraySegment buffer ) : void

Method Details

CreateCloseBuffer() public static method

public static CreateCloseBuffer ( WebSocketCloseStatus status, string description ) : byte[]
status WebSocketCloseStatus
description string
return byte[]

CreateCloseMessage() public static method

public static CreateCloseMessage ( ReceiverType type, byte closeArray ) : ArraySegment
type ReceiverType
closeArray byte
return ArraySegment

CreateSendsMessage() public static method

public static CreateSendsMessage ( ReceiverType type, List sends ) : ArraySegment
type ReceiverType
sends List
return ArraySegment

CreateSockJSWebSocketSendMessage() public static method

public static CreateSockJSWebSocketSendMessage ( ArraySegment buffer ) : ArraySegment
buffer ArraySegment
return ArraySegment