Re: Creating a C# like Asynchronous Socket

2017-11-06 Thread DrCataclysm via Digitalmars-d-learn
On Monday, 6 November 2017 at 08:03:23 UTC, DrCataclysm wrote: On Sunday, 5 November 2017 at 14:47:37 UTC, DrCataclysm wrote: I am trying to build something like the asynchronous Sockets from C# .NET but I'm stuck at the accepting phase. The client created by _socket.accept() cannot

Re: Creating a C# like Asynchronous Socket

2017-11-06 Thread DrCataclysm via Digitalmars-d-learn
On Sunday, 5 November 2017 at 14:47:37 UTC, DrCataclysm wrote: I am trying to build something like the asynchronous Sockets from C# .NET but I'm stuck at the accepting phase. The client created by _socket.accept() cannot receive any data. client.receive() immediately returns 0 like a

Creating a C# like Asynchronous Socket

2017-11-05 Thread DrCataclysm via Digitalmars-d-learn
I am trying to build something like the asynchronous Sockets from C# .NET but I'm stuck at the accepting phase. My code is something like this: public class TCPListener { ushort _port; string _address; bool _active; string _lineEnd; ubyte[] _messageBuffer; Socket