Echo server: Difference between revisions
Content added Content deleted
m (→{{header|PureBasic}}: Put the example at the good Alphabetic place in the page) |
(→{{header|D}}: Fails to multiplex incoming requests.) |
||
Line 512: | Line 512: | ||
=={{header|D}}== |
=={{header|D}}== |
||
This is a very basic server that processes the buffers one character at a time. In a real-world application, the buffers would be larger. |
This is a very basic server that processes the buffers one character at a time. In a real-world application, the buffers would be larger. More seriously, it processes one listener at a time. If the <code>currSock.receive()</code> blocks, the loop will not process other clients. This opens the door for a trivial denial-of-service attack. A realistic echo service must multiplex clients. |
||
<lang d> |
<lang d> |