Thread overview
[Issue 2000] New: listener.d fixups
Apr 16, 2008
d-bugmail
Apr 16, 2008
d-bugmail
Nov 08, 2009
changlon
Aug 24, 2011
Vladimir Panteleev
April 16, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2000

           Summary: listener.d fixups
           Product: D
           Version: 2.012
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: nyphbl8d@gmail.com


The sample code in listener.d is somewhat ugly in that it uses goto statements where continues should be used and does slightly odd things with iterating through an array.  I plan on changing this over to using an associative array keyed on the remote host:port address string unique to each socket.


-- 

April 16, 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2000





------- Comment #1 from nyphbl8d@gmail.com  2008-04-16 09:29 -------
Created an attachment (id=245)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=245&action=view)
invasive changes, array to associative array, dynamic buffer, code restructure

I modified the code to use a hash table, added a dynamic set of buffers, and reorganized code to minimize code duplication.  I maintained the original coding style so as to minimize the diff.


-- 

November 08, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2000


changlon <changlon@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |changlon@gmail.com


--- Comment #2 from changlon <changlon@gmail.com> 2009-11-08 09:23:30 PST ---
import
        std.stdio,
        std.socket,
        std.socketstream,
        std.stream;


void main(){
        auto Socket sock = new TcpSocket(new InternetAddress("127.0.0.1", 80));
        Stream ss = new SocketStream(sock);

}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
August 24, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=2000


Vladimir Panteleev <thecybershadow@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |thecybershadow@gmail.com
         Resolution|                            |WONTFIX


--- Comment #3 from Vladimir Panteleev <thecybershadow@gmail.com> 2011-08-24 14:57:36 PDT ---
Sorry, this patch has suffered too much bitrot to be easily applied to the current version of listener.d.

(It looks like listener.d was processed through some kind of automatic code formatter some time between 2.048 and 2.049. If that code formatter was available, this patch could have been applied to the old version and re-ran through said formatter, which would have made merging much easier.)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------