Trying to make a TCP server, client connects and disconnects immediately
Adam D. Ruppe via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Feb 5 16:24:53 PST 2015
On Friday, 6 February 2015 at 00:15:15 UTC, Gan wrote:
> ubyte[] buf = new ubyte[](0);
This is your problem: receive fills a preexisting buffer, and you
allocated zero bytes for it to fill, so it can't give you
anything.
Give it a bigger buffer, I like to use 4096, and it will work
better.
More information about the Digitalmars-d-learn
mailing list