Fix tcp listener (needed newlines at the end of messages)
This commit is contained in:
parent
ee3d42d6f3
commit
ce536774d7
|
@ -76,7 +76,7 @@ namespace SparkleLib {
|
||||||
|
|
||||||
foreach (string channel in base.channels) {
|
foreach (string channel in base.channels) {
|
||||||
SparkleHelpers.DebugInfo ("ListenerTcp", "Subscribing to channel " + channel);
|
SparkleHelpers.DebugInfo ("ListenerTcp", "Subscribing to channel " + channel);
|
||||||
this.socket.Send (Encoding.UTF8.GetBytes ("subscribe " + channel));
|
this.socket.Send (Encoding.UTF8.GetBytes ("subscribe " + channel + "\n"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ namespace SparkleLib {
|
||||||
if (IsConnected) {
|
if (IsConnected) {
|
||||||
SparkleHelpers.DebugInfo ("ListenerTcp", "Subscribing to channel " + channel);
|
SparkleHelpers.DebugInfo ("ListenerTcp", "Subscribing to channel " + channel);
|
||||||
|
|
||||||
string to_send = "subscribe " + folder_identifier;
|
string to_send = "subscribe " + folder_identifier + "\n";
|
||||||
|
|
||||||
lock (this.mutex) {
|
lock (this.mutex) {
|
||||||
this.socket.Send (Encoding.UTF8.GetBytes (to_send));
|
this.socket.Send (Encoding.UTF8.GetBytes (to_send));
|
||||||
|
@ -135,10 +135,11 @@ namespace SparkleLib {
|
||||||
|
|
||||||
public override void Announce (SparkleAnnouncement announcement)
|
public override void Announce (SparkleAnnouncement announcement)
|
||||||
{
|
{
|
||||||
string message = "announce " + announcement.FolderIdentifier;
|
string to_send = "announce " + announcement.FolderIdentifier
|
||||||
|
+ " " + announcement.Message + "\n";
|
||||||
|
|
||||||
lock (this.mutex) {
|
lock (this.mutex) {
|
||||||
this.socket.Send (Encoding.UTF8.GetBytes (message));
|
this.socket.Send (Encoding.UTF8.GetBytes (to_send));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue