On Tuesday, 29 April 2014 at 17:19:41 UTC, Adam D. Ruppe wrote:
On Tuesday, 29 April 2014 at 17:16:33 UTC, Tim wrote:
Is there anything I'm doing wrong?
You should be using a blocking socket. With them, the operating
system will put your thread on hold until a new connection
comes in.
On Thursday, 1 May 2014 at 08:08:37 UTC, Tim wrote:
On Tuesday, 29 April 2014 at 17:19:41 UTC, Adam D. Ruppe wrote:
On Tuesday, 29 April 2014 at 17:16:33 UTC, Tim wrote:
Is there anything I'm doing wrong?
You should be using a blocking socket. With them, the
operating system will put your
On Thursday, 1 May 2014 at 08:08:37 UTC, Tim wrote:
... the CPU usage goes up. I think that SocketShutdown.BOTH
causes Socket.select to fail which results in an endless loop.
Any suggestions how to handle that problem?
It shouldn't be here, disconnect would affect the new socket, and
you're
On Tuesday, 29 April 2014 at 17:44:21 UTC, Tim wrote:
On Tuesday, 29 April 2014 at 17:35:08 UTC, Tim wrote:
On Tuesday, 29 April 2014 at 17:19:41 UTC, Adam D. Ruppe wrote:
On Tuesday, 29 April 2014 at 17:16:33 UTC, Tim wrote:
Is there anything I'm doing wrong?
You should be using a blocking
On 04/30/2014 04:24 PM, Damian Day wrote:
Thread.sleep( dur!(msecs)( 20 ) );
Going off topic, the UFCS syntax makes that code much more readable. :)
Thread.sleep(20.msecs);
Ali
Hi guys,
I've the following snipped:
TcpSocket oSocket = new TcpSocket(AddressFamily.INET);
oSocket.bind(new InternetAddress(127.0.0.1, 12345));
oSocket.blocking(false);
oSocket.listen(0);
while(true)
{
try
{
Socket oRequestSocket = oSocket.accept();
On Tuesday, 29 April 2014 at 17:16:33 UTC, Tim wrote:
Is there anything I'm doing wrong?
You should be using a blocking socket. With them, the operating
system will put your thread on hold until a new connection comes
in. Without them, it will endlessly loop doing absolutely nothing
except
On Tuesday, 29 April 2014 at 17:19:41 UTC, Adam D. Ruppe wrote:
On Tuesday, 29 April 2014 at 17:16:33 UTC, Tim wrote:
Is there anything I'm doing wrong?
You should be using a blocking socket. With them, the operating
system will put your thread on hold until a new connection
comes in.
On Tuesday, 29 April 2014 at 17:35:08 UTC, Tim wrote:
On Tuesday, 29 April 2014 at 17:19:41 UTC, Adam D. Ruppe wrote:
On Tuesday, 29 April 2014 at 17:16:33 UTC, Tim wrote:
Is there anything I'm doing wrong?
You should be using a blocking socket. With them, the
operating system will put your
On Tue, 29 Apr 2014 17:16:32 +, Tim wrote:
Hi guys,
I've the following snipped:
TcpSocket oSocket = new TcpSocket(AddressFamily.INET); oSocket.bind(new
InternetAddress(127.0.0.1, 12345)); oSocket.blocking(false);
oSocket.listen(0);
while(true)
{
try {
Socket
10 matches
Mail list logo