How to use eventcore write an echo server?

2024-03-11 Thread zoujiaqing via Digitalmars-d-learn
I use eventcore latest version write an echo server for test. some error of build. my D code: ```D import eventcore.core; import std.functional : toDelegate; import std.socket : InternetAddress; import std.exception : enforce; import core.time : Duration; import std.stdio : writeln; void main

Re: How to use eventcore write an echo server?

2024-03-14 Thread Dejan Lekic via Digitalmars-d-learn
On Tuesday, 12 March 2024 at 05:13:26 UTC, zoujiaqing wrote: How to fix it? than you ;) Try the following: ``` class Connection { StreamSocketFD client; ubyte[1024] buf = void; // Add these two lines before the constructor: nothrow: @safe: thi

Re: How to use eventcore write an echo server?

2024-03-25 Thread electricface via Digitalmars-d-learn
On Thursday, 14 March 2024 at 18:49:54 UTC, Dejan Lekic wrote: On Tuesday, 12 March 2024 at 05:13:26 UTC, zoujiaqing wrote: How to fix it? than you ;) Try the following: ``` class Connection { StreamSocketFD client; ubyte[1024] buf = void; // Add these two lines befo