C# Class Server.Connector

显示文件 Open project: porcellus/KomponensAlapuJatek

Public Properties

Property Type Description
clientport System.Int32
playerip String

Public Methods

Method Description
Connector ( ) : System
connectoServer ( String ip, Int32 port, String name, String gametype ) : void
getLobby ( String gametype ) : String[]
requestGame ( String opponentip, Int32 opponentport, String myname ) : void
sendRequestreply ( String reply ) : void
step ( Object step ) : void

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

OnConnectionAccept ( ConnectionAcceptEventArgs e ) : void
OnConnectionRequest ( ConnectionRequestEventArgs e ) : void
OnStep ( StepEventArgs e ) : void

Private Methods

Method Description
AcceptCallback ( IAsyncResult ar ) : void
Combine ( byte first, byte second ) : byte[]
ConnectCallback ( IAsyncResult ar ) : void
InitializeComponent ( ) : void

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

ReadCallback ( IAsyncResult ar ) : void
Send ( Socket client, String data ) : void
Send ( Socket client, byte data ) : void
SendCallback ( IAsyncResult ar ) : void
deserializeToObject ( byte bytes, int offset ) : object
readStream ( Stream stream, int readsize ) : String
serializeObject ( Object obj ) : byte[]
writeStream ( Stream stream, String message ) : void

Method Details

Connector() public method

public Connector ( ) : System
return System

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

OnConnectionAccept() protected method

protected OnConnectionAccept ( ConnectionAcceptEventArgs e ) : void
e Connector.ConnectionAcceptEventArgs
return void

OnConnectionRequest() protected method

protected OnConnectionRequest ( ConnectionRequestEventArgs e ) : void
e Connector.ConnectionRequestEventArgs
return void

OnStep() protected method

protected OnStep ( StepEventArgs e ) : void
e Connector.StepEventArgs
return void

connectoServer() public method

public connectoServer ( String ip, Int32 port, String name, String gametype ) : void
ip String
port System.Int32
name String
gametype String
return void

getLobby() public method

public getLobby ( String gametype ) : String[]
gametype String
return String[]

requestGame() public method

public requestGame ( String opponentip, Int32 opponentport, String myname ) : void
opponentip String
opponentport System.Int32
myname String
return void

sendRequestreply() public method

public sendRequestreply ( String reply ) : void
reply String
return void

step() public method

public step ( Object step ) : void
step Object
return void

Property Details

clientport public_oe property

public Int32,System clientport
return System.Int32

playerip public_oe property

public String playerip
return String