Sockets issue

okibi okibi at ratedo.com
Wed Jan 16 06:19:53 PST 2008


okibi Wrote:

> James Dennett Wrote:
> 
> > BCS wrote:
> > > okibi wrote:
> > >>> while (true)
> > >>> {
> > >>>     Socket clientSocket = soc.accept();
> > > 
> > > if it runs to here then you have accepted a connection, if it gets here 
> > > a second time, you have accepted a second connection.
> > 
> > Maybe it's worth noting that it takes only one connection
> > at a time unlike most real servers which handle concurrent
> > connections.
> > 
> > -- James
> > 
> 
> Client side will make a connection, send a string, and disconnect prior to another connection being made.
> 
> Anyways, the line break idea didn't work.

By throwing in some writef's, I've been able to get multiple connections.

However, the second connection fails upon completion. I'm getting errors with "shouldn't be able to reach 'insert memory location'" as well as "cannot reference 'insert memory location'" upon handling the data passed. Odd...


More information about the Digitalmars-d-learn mailing list