Re: Using Vibe.d for not HTTP

2020-05-25 Thread Russel Winder via Digitalmars-d-learn
On Mon, 2020-05-25 at 12:29 +, Panke via Digitalmars-d-learn wrote: > […] > https://vibed.org/api/vibe.core.core/runTask ? > Possibly, it is just that the documentation is sadly lacking in examples of use. -- Russel. === Dr Russel Winder t: +44

Re: Using Vibe.d for not HTTP

2020-05-25 Thread Panke via Digitalmars-d-learn
On Monday, 25 May 2020 at 12:04:12 UTC, Russel Winder wrote: Now I need to find out how to spawn a task that can send out data even when the connection handler is blocked awaiting something to read. https://vibed.org/api/vibe.core.core/runTask ?

Re: Using Vibe.d for not HTTP

2020-05-25 Thread Russel Winder via Digitalmars-d-learn
On Mon, 2020-05-25 at 11:55 +0200, Daniel Kozak via Digitalmars-d-learn wrote: […] > > https://run.dlang.io/is/SMLuA2 Thanks for this pointer. It was very helpful to read it as it confirmed that I was going doing the right thing in my code. That you have two sources adding some interleaving is

Re: Using Vibe.d for not HTTP

2020-05-25 Thread Daniel Kozak via Digitalmars-d-learn
On Sun, May 24, 2020 at 10:10 AM Russel Winder via Digitalmars-d-learn wrote: > > Hi, > > Clearly Vibe.d is mostly for people doing HTTP and HTTPS stuff. Yet it claims > to be able to support TCP and UDP working with other protocols. However, all > the serious examples are HTTP/HTTPS related. All

Re: Using Vibe.d for not HTTP

2020-05-24 Thread Panke via Digitalmars-d-learn
On Sunday, 24 May 2020 at 16:14:58 UTC, Russel Winder wrote: On Sun, 2020-05-24 at 17:01 +0100, Russel Winder wrote: […] connection.read(buffer, IOMode.once); What an idiot I am, this call returns the read count, which makes it fine. Progress now being made. I had a look. Documentation

Re: Using Vibe.d for not HTTP

2020-05-24 Thread Russel Winder via Digitalmars-d-learn
On Sun, 2020-05-24 at 17:01 +0100, Russel Winder wrote: > […] > connection.read(buffer, IOMode.once); > What an idiot I am, this call returns the read count, which makes it fine. Progress now being made. -- Russel. === Dr Russel Winder t: +44 20

Re: Using Vibe.d for not HTTP

2020-05-24 Thread Russel Winder via Digitalmars-d-learn
On Sun, 2020-05-24 at 12:26 +, bauss via Digitalmars-d-learn wrote: […] Thanks for responding, much appreciated. > void handleConnections(TCPConnection connection) { > ... > } I guess I was looking for an example of what to put in this function! > auto buf = new ubyte[amount]; > >

Re: Using Vibe.d for not HTTP

2020-05-24 Thread bauss via Digitalmars-d-learn
On Sunday, 24 May 2020 at 08:10:33 UTC, Russel Winder wrote: Hi, Clearly Vibe.d is mostly for people doing HTTP and HTTPS stuff. Yet it claims to be able to support TCP and UDP working with other protocols. However, all the serious examples are HTTP/HTTPS related. All the TCP and UDP