Trying to make a TCP server, client connects and disconnects immediately

Gan via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Feb 5 16:27:59 PST 2015


On Friday, 6 February 2015 at 00:24:54 UTC, Adam D. Ruppe wrote:
> 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.

Will there ever be a message bigger than 4096 bytes?


More information about the Digitalmars-d-learn mailing list