On Monday, 28 September 2015 at 10:52:07 UTC, anonymous wrote:
On Monday 28 September 2015 12:40, anonymous wrote:
The client probably sends a newline; i.e. buffer[0 ..
received] is "exit\n".
Or more likely it's "exit\r\n".
I changed condition to:
if(to!string(buffer[0..received]) ==
On Monday, 28 September 2015 at 04:55:30 UTC, tcak wrote:
On Sunday, 27 September 2015 at 23:56:10 UTC, holo wrote:
Hello
Im trying to execute commands on server side. Here is my
server based on other example from forum:
[...]
You are comparing whole buffer to "exit"
I changed my
On Monday 28 September 2015 12:40, anonymous wrote:
> The client probably sends a newline; i.e. buffer[0 .. received] is
> "exit\n".
Or more likely it's "exit\r\n".
On Monday 28 September 2015 11:59, holo wrote:
> I changed my condition to:
>
> if(to!string(buffer[0..received]) == "exit")
> {
>
> break;
> }
>
>
> But it still dint help.
The client probably sends a newline; i.e. buffer[0 .. received] is "exit\n".
On Monday, 28 September 2015 at 11:44:32 UTC, holo wrote:
if(to!string(buffer[0..received]) == "exit\n")
You shouldn't need that to!string by the way. I believe that will
work just comparing the buffer directly.
Converting to string is more important when you are storing a
copy than just
On Monday, 28 September 2015 at 13:01:25 UTC, Adam D. Ruppe wrote:
On Monday, 28 September 2015 at 11:44:32 UTC, holo wrote:
if(to!string(buffer[0..received]) == "exit\n")
You shouldn't need that to!string by the way. I believe that
will work just comparing the buffer directly.
Converting
Hello
Im trying to execute commands on server side. Here is my server
based on other example from forum:
#!/usr/bin/rdmd
import std.stdio;
import std.socket;
import std.algorithm;
import std.conv;
void main() {
Socket server = new TcpSocket();
On Sunday, 27 September 2015 at 23:56:10 UTC, holo wrote:
Hello
Im trying to execute commands on server side. Here is my server
based on other example from forum:
[...]
You are comparing whole buffer to "exit"