C# Class SSC_Server.MainWindow

Exibir arquivo Open project: StoneMoe/SimpleSecureChat

Public Properties

Property Type Description
clientDic Socket>.Dictionary

Public Methods

Method Description
AcceptHandler ( ) : void
Broadcast ( byte msg, bool ForALL, Socket exceptClient = null ) : void
ClientHandler ( Socket client ) : void
ClientNicknameExisted ( string username ) : bool
Decrypt ( string toDecrypt, string key ) : string
ERRLog ( string text, bool firstline = false ) : void
Encrypt ( string toEncrypt, string key ) : string
MSGLog ( string text, bool firstline = false ) : void
MainWindow ( ) : System
RegClient ( string name, Socket s ) : void
SYSLog ( string text, bool firstline = false ) : void
UnRegClient ( string name ) : void
debugLog ( string text, bool firstline = false ) : void
kickAllClient ( ) : void
makeUI ( bool enable ) : void
outputAllClient ( ) : string
parseData ( string rawdata ) : string[]
parseMsg ( string cmd, string msg ) : byte[]
str2bytes ( string before ) : byte[]

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

Private Methods

Method Description
InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

LogBox_TextChanged ( object sender, EventArgs e ) : void
MainWindow_Load ( object sender, EventArgs e ) : void
StartButton_Click ( object sender, EventArgs e ) : void

Method Details

AcceptHandler() public method

public AcceptHandler ( ) : void
return void

Broadcast() public method

public Broadcast ( byte msg, bool ForALL, Socket exceptClient = null ) : void
msg byte
ForALL bool
exceptClient Socket
return void

ClientHandler() public method

public ClientHandler ( Socket client ) : void
client Socket
return void

ClientNicknameExisted() public method

public ClientNicknameExisted ( string username ) : bool
username string
return bool

Decrypt() public method

public Decrypt ( string toDecrypt, string key ) : string
toDecrypt string
key string
return string

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void

ERRLog() public method

public ERRLog ( string text, bool firstline = false ) : void
text string
firstline bool
return void

Encrypt() public method

public Encrypt ( string toEncrypt, string key ) : string
toEncrypt string
key string
return string

MSGLog() public method

public MSGLog ( string text, bool firstline = false ) : void
text string
firstline bool
return void

MainWindow() public method

public MainWindow ( ) : System
return System

RegClient() public method

public RegClient ( string name, Socket s ) : void
name string
s Socket
return void

SYSLog() public method

public SYSLog ( string text, bool firstline = false ) : void
text string
firstline bool
return void

UnRegClient() public method

public UnRegClient ( string name ) : void
name string
return void

debugLog() public method

public debugLog ( string text, bool firstline = false ) : void
text string
firstline bool
return void

kickAllClient() public method

public kickAllClient ( ) : void
return void

makeUI() public method

public makeUI ( bool enable ) : void
enable bool
return void

outputAllClient() public method

public outputAllClient ( ) : string
return string

parseData() public method

public parseData ( string rawdata ) : string[]
rawdata string
return string[]

parseMsg() public method

public parseMsg ( string cmd, string msg ) : byte[]
cmd string
msg string
return byte[]

str2bytes() public method

public str2bytes ( string before ) : byte[]
before string
return byte[]

Property Details

clientDic public_oe property

public Dictionary clientDic
return Socket>.Dictionary