Commit c943647c authored by Colomban Wendling's avatar Colomban Wendling
Browse files

LibOVCC: Make SignalHandle.signal_received() a signal

parent 1c263f4d
......@@ -55,6 +55,8 @@ namespace OVCC.Network
private int[] ignore_next = new int[SignalType.TYPES_N];
public signal void signal_received (SignalMessage msg);
public SignalHandle (Game game, Player player,
DataInputStream input_p, DataOutputStream output_p)
{
......@@ -76,6 +78,7 @@ namespace OVCC.Network
send_to_peer (SignalType.GAME_STATE, "i", state);
// }
});
this.signal_received.connect (this.signal_received_handler);
}
private bool send_to_peer (SignalType s, string format, ...)
......@@ -97,7 +100,7 @@ namespace OVCC.Network
return true;
}
public bool signal_received (SignalMessage msg)
private void signal_received_handler (SignalMessage msg)
{
debug ("Received signal %s", msg.stype.to_string());
ignore_next[msg.stype]++;
......@@ -137,7 +140,6 @@ namespace OVCC.Network
}
break;
}
return true;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment