summaryrefslogtreecommitdiff
path: root/Ivy/IvyTCPStreamV4.cs
diff options
context:
space:
mode:
authorfcolin2010-03-12 16:40:27 +0000
committerfcolin2010-03-12 16:40:27 +0000
commitebc2a8ef21bd90e753cf9b88ea186b0c87775de3 (patch)
treea872054e01243a0cb1a000f36f8a1e64e1f87914 /Ivy/IvyTCPStreamV4.cs
parentddccd3d8f4fd59fb19fa6262460bbc5e2e67eac7 (diff)
downloadivy-csharp-ebc2a8ef21bd90e753cf9b88ea186b0c87775de3.zip
ivy-csharp-ebc2a8ef21bd90e753cf9b88ea186b0c87775de3.tar.gz
ivy-csharp-ebc2a8ef21bd90e753cf9b88ea186b0c87775de3.tar.bz2
ivy-csharp-ebc2a8ef21bd90e753cf9b88ea186b0c87775de3.tar.xz
mise en conformité des messages ping /pong
start regexpid a 0 catch plantage NULL ref Correction pb a la fermeture d'ivy
Diffstat (limited to 'Ivy/IvyTCPStreamV4.cs')
-rw-r--r--Ivy/IvyTCPStreamV4.cs19
1 files changed, 10 insertions, 9 deletions
diff --git a/Ivy/IvyTCPStreamV4.cs b/Ivy/IvyTCPStreamV4.cs
index 65e325c..20526c7 100644
--- a/Ivy/IvyTCPStreamV4.cs
+++ b/Ivy/IvyTCPStreamV4.cs
@@ -45,11 +45,12 @@ namespace IvyBus
this.output = new BinaryWriter(this, Ivy.ivyEncoding);
this.receiver = _receiver;
}
-
- internal void Close()
+
+ void IvyProtocol.Close()
{
- this.input.Close();
this.output.Close();
+ this.input.Close();
+ this.Socket.Shutdown(SocketShutdown.Both);
base.Close();
}
@@ -124,13 +125,13 @@ namespace IvyBus
{
sendMsg(MessageType.DirectMsg, id, message);
}
- void IvyProtocol.TokenPong(string s)
+ void IvyProtocol.TokenPong(int id, string s)
{
- sendMsg(MessageType.Pong, 0, s);
+ sendMsg(MessageType.Pong, id, s);
}
- void IvyProtocol.TokenPing(string s)
+ void IvyProtocol.TokenPing(int id, string s)
{
- sendMsg(MessageType.Ping, 0, s);
+ sendMsg(MessageType.Ping, id, s);
}
void IvyProtocol.TokenBye(int id, string message)
@@ -233,11 +234,11 @@ namespace IvyBus
break;
case MessageType.Pong:
- receiver.TokenPong(msgData[0]);
+ receiver.TokenPong( msgId, msgData[0]);
break;
case MessageType.Ping:
- receiver.TokenPing(msgData[0]);
+ receiver.TokenPing( msgId, msgData[0]);
break;
case MessageType.Error: