Bug 2000 – listener.d fixups

Status
RESOLVED
Resolution
WONTFIX
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2008-04-16T08:38:00Z
Last change time
2015-06-09T01:14:35Z
Assigned to
nobody
Creator
nyphbl8d

Attachments

IDFilenameSummaryContent-TypeSize
245listener.diffinvasive changes, array to associative array, dynamic buffer, code restructuretext/plain3692

Comments

Comment #0 by nyphbl8d — 2008-04-16T08:38:47Z
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.
Comment #1 by nyphbl8d — 2008-04-16T09:29:13Z
Created attachment 245 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.
Comment #2 by changlon — 2009-11-08T09:23:30Z
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); }
Comment #3 by dlang-bugzilla — 2011-08-24T14:57:36Z
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.)