summaryrefslogtreecommitdiff
path: root/Ivy/IvyTCPStreamV4.cs
diff options
context:
space:
mode:
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: