www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2000] New: listener.d fixups

reply d-bugmail puremagic.com writes:
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.


-- 
Apr 16 2008
next sibling parent d-bugmail puremagic.com writes:
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.


-- 
Apr 16 2008
prev sibling parent d-bugmail puremagic.com writes:
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: -------
Nov 08 2009