C# Class Bauglir.Ex.WebSocketConnection

basic WebSocket connection
Afficher le fichier Open project: gwupe/Gwupe Class Usage Examples

Protected Properties

Свойство Type Description
fClient System.Net.Sockets.TcpClient
fClosedByMe bool
fClosedByPeer bool
fCookie string
fExtension string
fFullDataProcess bool
fHandshake bool
fHeaders Bauglir.Ex.WebSocketHeaders
fHost string
fIndex int
fMasking bool
fOrigin string
fPort string
fProtocol string
fRequireMask bool
fResourceName string
fSsl bool
fSslStream System.Net.Security.SslStream
fVersion int

Méthodes publiques

Méthode Description
Close ( int aCloseCode ) : void
Close ( int aCloseCode, string aCloseReason ) : void

close connection

Ping ( string aData ) : bool

send ping

Pong ( string aData ) : bool

send pong

SendBinary ( MemoryStream aStream ) : bool
SendBinary ( MemoryStream aStream, bool aWriteFinal ) : bool
SendBinary ( MemoryStream aStream, bool aWriteFinal, bool aRes1 ) : bool
SendBinary ( MemoryStream aStream, bool aWriteFinal, bool aRes1, bool aRes2 ) : bool
SendBinary ( MemoryStream aStream, bool aWriteFinal, bool aRes1, bool aRes2, bool aRes3 ) : bool

Send binary data

SendBinaryContinuation ( MemoryStream aStream ) : bool
SendBinaryContinuation ( MemoryStream aStream, bool aWriteFinal ) : bool
SendBinaryContinuation ( MemoryStream aStream, bool aWriteFinal, bool aRes1 ) : bool
SendBinaryContinuation ( MemoryStream aStream, bool aWriteFinal, bool aRes1, bool aRes2 ) : bool
SendBinaryContinuation ( MemoryStream aStream, bool aWriteFinal, bool aRes1, bool aRes2, bool aRes3 ) : bool

send binary continuation data see SendBinary for parameter and result response

SendData ( bool aWriteFinal, bool aRes1, bool aRes2, bool aRes3, int aWriteCode, MemoryStream aStream ) : bool
SendData ( bool aWriteFinal, bool aRes1, bool aRes2, bool aRes3, int aWriteCode, String aData ) : bool
SendText ( String aString ) : bool
SendText ( String aString, bool aWriteFinal ) : bool
SendText ( String aString, bool aWriteFinal, bool aRes1 ) : bool
SendText ( String aString, bool aWriteFinal, bool aRes1, bool aRes2 ) : bool
SendText ( String aString, bool aWriteFinal, bool aRes1, bool aRes2, bool aRes3 ) : bool

Send textual data

SendTextContinuation ( String aString ) : bool
SendTextContinuation ( String aString, bool aWriteFinal ) : bool
SendTextContinuation ( String aString, bool aWriteFinal, bool aRes1 ) : bool
SendTextContinuation ( String aString, bool aWriteFinal, bool aRes1, bool aRes2 ) : bool
SendTextContinuation ( String aString, bool aWriteFinal, bool aRes1, bool aRes2, bool aRes3 ) : bool

Send textual continuation data

WebSocketConnection ( ) : System
WebSocketConnection ( TcpClient aClient ) : System

Méthodes protégées

Méthode Description
Close ( ) : void
Execute ( ) : void
ProcessClose ( int aCloseCode, string aCloseReason, bool aClosedByPeer ) : void
ProcessData ( bool &aReadFinal, bool &aRes1, bool &aRes2, bool &aRes3, int &aReadCode, MemoryStream aStream ) : void
ProcessPing ( string aData ) : void
ProcessPong ( string aData ) : void
ProcessStream ( bool aReadFinal, bool aRes1, bool aRes2, bool aRes3, MemoryStream aStream ) : void
ProcessStreamContinuation ( bool aReadFinal, bool aRes1, bool aRes2, bool aRes3, MemoryStream aStream ) : void
ProcessStreamFull ( MemoryStream aStream ) : void
ProcessText ( bool aReadFinal, bool aRes1, bool aRes2, bool aRes3, string aString ) : void
ProcessTextContinuation ( bool aReadFinal, bool aRes1, bool aRes2, bool aRes3, string aString ) : void
ProcessTextFull ( string aString ) : void
ReadByte ( Stream aStream, int &aByte ) : bool
ReadData ( bool &aReadFinal, bool &aRes1, bool &aRes2, bool &aRes3, int &aReadCode, MemoryStream aStream ) : bool
ReverseBytes ( byte inArray ) : byte[]
StartRead ( ) : void
getStream ( TcpClient aClient ) : Stream

Method Details

Close() protected méthode

protected Close ( ) : void
Résultat void

Close() public méthode

public Close ( int aCloseCode ) : void
aCloseCode int
Résultat void

Close() public méthode

close connection
public Close ( int aCloseCode, string aCloseReason ) : void
aCloseCode int WebSocketCloseCode constant reason
aCloseReason string textual data (max 123 bytes)
Résultat void

Execute() protected méthode

protected Execute ( ) : void
Résultat void

Ping() public méthode

send ping
public Ping ( string aData ) : bool
aData string string data
Résultat bool

Pong() public méthode

send pong
public Pong ( string aData ) : bool
aData string string data
Résultat bool

ProcessClose() protected méthode

protected ProcessClose ( int aCloseCode, string aCloseReason, bool aClosedByPeer ) : void
aCloseCode int
aCloseReason string
aClosedByPeer bool
Résultat void

ProcessData() protected méthode

protected ProcessData ( bool &aReadFinal, bool &aRes1, bool &aRes2, bool &aRes3, int &aReadCode, MemoryStream aStream ) : void
aReadFinal bool
aRes1 bool
aRes2 bool
aRes3 bool
aReadCode int
aStream System.IO.MemoryStream
Résultat void

ProcessPing() protected méthode

protected ProcessPing ( string aData ) : void
aData string
Résultat void

ProcessPong() protected méthode

protected ProcessPong ( string aData ) : void
aData string
Résultat void

ProcessStream() protected méthode

protected ProcessStream ( bool aReadFinal, bool aRes1, bool aRes2, bool aRes3, MemoryStream aStream ) : void
aReadFinal bool
aRes1 bool
aRes2 bool
aRes3 bool
aStream System.IO.MemoryStream
Résultat void

ProcessStreamContinuation() protected méthode

protected ProcessStreamContinuation ( bool aReadFinal, bool aRes1, bool aRes2, bool aRes3, MemoryStream aStream ) : void
aReadFinal bool
aRes1 bool
aRes2 bool
aRes3 bool
aStream System.IO.MemoryStream
Résultat void

ProcessStreamFull() protected méthode

protected ProcessStreamFull ( MemoryStream aStream ) : void
aStream System.IO.MemoryStream
Résultat void

ProcessText() protected méthode

protected ProcessText ( bool aReadFinal, bool aRes1, bool aRes2, bool aRes3, string aString ) : void
aReadFinal bool
aRes1 bool
aRes2 bool
aRes3 bool
aString string
Résultat void

ProcessTextContinuation() protected méthode

protected ProcessTextContinuation ( bool aReadFinal, bool aRes1, bool aRes2, bool aRes3, string aString ) : void
aReadFinal bool
aRes1 bool
aRes2 bool
aRes3 bool
aString string
Résultat void

ProcessTextFull() protected méthode

protected ProcessTextFull ( string aString ) : void
aString string
Résultat void

ReadByte() protected méthode

protected ReadByte ( Stream aStream, int &aByte ) : bool
aStream Stream
aByte int
Résultat bool

ReadData() protected méthode

protected ReadData ( bool &aReadFinal, bool &aRes1, bool &aRes2, bool &aRes3, int &aReadCode, MemoryStream aStream ) : bool
aReadFinal bool
aRes1 bool
aRes2 bool
aRes3 bool
aReadCode int
aStream System.IO.MemoryStream
Résultat bool

ReverseBytes() protected static méthode

protected static ReverseBytes ( byte inArray ) : byte[]
inArray byte
Résultat byte[]

SendBinary() public méthode

public SendBinary ( MemoryStream aStream ) : bool
aStream System.IO.MemoryStream
Résultat bool

SendBinary() public méthode

public SendBinary ( MemoryStream aStream, bool aWriteFinal ) : bool
aStream System.IO.MemoryStream
aWriteFinal bool
Résultat bool

SendBinary() public méthode

public SendBinary ( MemoryStream aStream, bool aWriteFinal, bool aRes1 ) : bool
aStream System.IO.MemoryStream
aWriteFinal bool
aRes1 bool
Résultat bool

SendBinary() public méthode

public SendBinary ( MemoryStream aStream, bool aWriteFinal, bool aRes1, bool aRes2 ) : bool
aStream System.IO.MemoryStream
aWriteFinal bool
aRes1 bool
aRes2 bool
Résultat bool

SendBinary() public méthode

Send binary data
public SendBinary ( MemoryStream aStream, bool aWriteFinal, bool aRes1, bool aRes2, bool aRes3 ) : bool
aStream System.IO.MemoryStream binary data
aWriteFinal bool whether frame is final
aRes1 bool extensions 1st bit
aRes2 bool extensions 2nd bit
aRes3 bool extensions 3nd bit
Résultat bool

SendBinaryContinuation() public méthode

public SendBinaryContinuation ( MemoryStream aStream ) : bool
aStream System.IO.MemoryStream
Résultat bool

SendBinaryContinuation() public méthode

public SendBinaryContinuation ( MemoryStream aStream, bool aWriteFinal ) : bool
aStream System.IO.MemoryStream
aWriteFinal bool
Résultat bool

SendBinaryContinuation() public méthode

public SendBinaryContinuation ( MemoryStream aStream, bool aWriteFinal, bool aRes1 ) : bool
aStream System.IO.MemoryStream
aWriteFinal bool
aRes1 bool
Résultat bool

SendBinaryContinuation() public méthode

public SendBinaryContinuation ( MemoryStream aStream, bool aWriteFinal, bool aRes1, bool aRes2 ) : bool
aStream System.IO.MemoryStream
aWriteFinal bool
aRes1 bool
aRes2 bool
Résultat bool

SendBinaryContinuation() public méthode

send binary continuation data see SendBinary for parameter and result response
public SendBinaryContinuation ( MemoryStream aStream, bool aWriteFinal, bool aRes1, bool aRes2, bool aRes3 ) : bool
aStream System.IO.MemoryStream binary data
aWriteFinal bool whether frame is final
aRes1 bool extensions 1st bit
aRes2 bool extensions 2nd bit
aRes3 bool extensions 3nd bit
Résultat bool

SendData() public méthode

public SendData ( bool aWriteFinal, bool aRes1, bool aRes2, bool aRes3, int aWriteCode, MemoryStream aStream ) : bool
aWriteFinal bool
aRes1 bool
aRes2 bool
aRes3 bool
aWriteCode int
aStream System.IO.MemoryStream
Résultat bool

SendData() public méthode

public SendData ( bool aWriteFinal, bool aRes1, bool aRes2, bool aRes3, int aWriteCode, String aData ) : bool
aWriteFinal bool
aRes1 bool
aRes2 bool
aRes3 bool
aWriteCode int
aData String
Résultat bool

SendText() public méthode

public SendText ( String aString ) : bool
aString String
Résultat bool

SendText() public méthode

public SendText ( String aString, bool aWriteFinal ) : bool
aString String
aWriteFinal bool
Résultat bool

SendText() public méthode

public SendText ( String aString, bool aWriteFinal, bool aRes1 ) : bool
aString String
aWriteFinal bool
aRes1 bool
Résultat bool

SendText() public méthode

public SendText ( String aString, bool aWriteFinal, bool aRes1, bool aRes2 ) : bool
aString String
aWriteFinal bool
aRes1 bool
aRes2 bool
Résultat bool

SendText() public méthode

Send textual data
public SendText ( String aString, bool aWriteFinal, bool aRes1, bool aRes2, bool aRes3 ) : bool
aString String string data
aWriteFinal bool whether frame is final
aRes1 bool extensions 1st bit
aRes2 bool extensions 2nd bit
aRes3 bool extensions 3nd bit
Résultat bool

SendTextContinuation() public méthode

public SendTextContinuation ( String aString ) : bool
aString String
Résultat bool

SendTextContinuation() public méthode

public SendTextContinuation ( String aString, bool aWriteFinal ) : bool
aString String
aWriteFinal bool
Résultat bool

SendTextContinuation() public méthode

public SendTextContinuation ( String aString, bool aWriteFinal, bool aRes1 ) : bool
aString String
aWriteFinal bool
aRes1 bool
Résultat bool

SendTextContinuation() public méthode

public SendTextContinuation ( String aString, bool aWriteFinal, bool aRes1, bool aRes2 ) : bool
aString String
aWriteFinal bool
aRes1 bool
aRes2 bool
Résultat bool

SendTextContinuation() public méthode

Send textual continuation data
public SendTextContinuation ( String aString, bool aWriteFinal, bool aRes1, bool aRes2, bool aRes3 ) : bool
aString String string data
aWriteFinal bool whether frame is final
aRes1 bool extensions 1st bit
aRes2 bool extensions 2nd bit
aRes3 bool extensions 3nd bit
Résultat bool

StartRead() protected méthode

protected StartRead ( ) : void
Résultat void

WebSocketConnection() public méthode

public WebSocketConnection ( ) : System
Résultat System

WebSocketConnection() public méthode

public WebSocketConnection ( TcpClient aClient ) : System
aClient System.Net.Sockets.TcpClient
Résultat System

getStream() protected méthode

protected getStream ( TcpClient aClient ) : Stream
aClient System.Net.Sockets.TcpClient
Résultat Stream

Property Details

fClient protected_oe property

protected TcpClient,System.Net.Sockets fClient
Résultat System.Net.Sockets.TcpClient

fClosedByMe protected_oe property

protected bool fClosedByMe
Résultat bool

fClosedByPeer protected_oe property

protected bool fClosedByPeer
Résultat bool

fCookie protected_oe property

protected string fCookie
Résultat string

fExtension protected_oe property

protected string fExtension
Résultat string

fFullDataProcess protected_oe property

protected bool fFullDataProcess
Résultat bool

fHandshake protected_oe property

protected bool fHandshake
Résultat bool

fHeaders protected_oe property

protected WebSocketHeaders,Bauglir.Ex fHeaders
Résultat Bauglir.Ex.WebSocketHeaders

fHost protected_oe property

protected string fHost
Résultat string

fIndex protected_oe property

protected int fIndex
Résultat int

fMasking protected_oe property

protected bool fMasking
Résultat bool

fOrigin protected_oe property

protected string fOrigin
Résultat string

fPort protected_oe property

protected string fPort
Résultat string

fProtocol protected_oe property

protected string fProtocol
Résultat string

fRequireMask protected_oe property

protected bool fRequireMask
Résultat bool

fResourceName protected_oe property

protected string fResourceName
Résultat string

fSsl protected_oe property

protected bool fSsl
Résultat bool

fSslStream protected_oe property

protected SslStream,System.Net.Security fSslStream
Résultat System.Net.Security.SslStream

fVersion protected_oe property

protected int fVersion
Résultat int