Beispiel #1
0
 abstract public void Send(TCPConnection con);
Beispiel #2
0
 abstract public void Open(TCPConnection con);
Beispiel #3
0
 abstract public void Close(TCPConnection con);
Beispiel #4
0
 public override void Open(TCPConnection con)
 {
     Console.WriteLine("abrindo");
     SetState(con, new TCPOpenned());
 }
Beispiel #5
0
 public override void Send(TCPConnection con)
 {
     Console.WriteLine("impossível mandar mensagem com cone~xão fechada");
 }
Beispiel #6
0
 public override void Close(TCPConnection con)
 {
     Console.WriteLine("conexão já fechada");
 }
Beispiel #7
0
 public override void Send(TCPConnection con)
 {
     Console.WriteLine("enviar mensagem");
 }
Beispiel #8
0
 public override void Open(TCPConnection con)
 {
     Console.WriteLine("conexão já aberta");
 }
Beispiel #9
0
 public override void Close(TCPConnection con)
 {
     Console.WriteLine("fechando conexao");
     SetState(con, new TCPClosed()); // modo burro, so de exemplo
 }
Beispiel #10
0
 protected void SetState(TCPConnection con, ITCPState state)
 {
     con.state = state;
 }