Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Ruby (http://www.velocityreviews.com/forums/f66-ruby.html)
-   -   Brian Schroeders chat example on windows (http://www.velocityreviews.com/forums/t817743-brian-schroeders-chat-example-on-windows.html)

Robert Feldt 11-04-2004 11:47 AM

Brian Schroeders chat example on windows
 
Hi again,

Has anyone been able to run the chat example from Brian Schroeders "A
Ruby a day" course on Windows (latest one-click)? My students say it
does not work (no info is communicated over the socket) while when I run
it on linux it works fine. They say they already tried disabling the
firewall so shouldn't be that... ;)

Anyone run into similar problems?

/Robert




Brian Schröder 11-04-2004 07:18 PM

Re: Brian Schroeders chat example on windows
 
Hello Robert,

nice to hear, that you are using the course. In my course there was one person with a windows system, and his problem was, that the console only drew the received text, when he hit return. So not usable as a chat client. cmd seems to cache printed text while it is reading with gets.

Regards,

Brian

On Thu, 4 Nov 2004 20:47:06 +0900
Robert Feldt <Robert.Feldt@htu.se> wrote:

> Hi again,
>
> Has anyone been able to run the chat example from Brian Schroeders "A
> Ruby a day" course on Windows (latest one-click)? My students say it
> does not work (no info is communicated over the socket) while when I run
> it on linux it works fine. They say they already tried disabling the
> firewall so shouldn't be that... ;)
>
> Anyone run into similar problems?
>
> /Robert
>
>



--
Brian Schröder
http://www.brian-schroeder.de/




gabriele renzi 11-05-2004 01:27 AM

Re: Brian Schroeders chat example on windows
 
Brian Schröder ha scritto:
> Hello Robert,
>
> nice to hear, that you are using the course.
> In my course there was one person with a windows system,
> and his problem was, that the console only drew the received text,
> when he hit return. So not usable as a chat client.
> cmd seems to cache printed text while it is reading with gets.
>
> Regards,
>
> Brian


isn't this an example of the know threading issues on windows?
(basically, IO on non-sockets objects like the console is blocking).

Robert Feldt 11-05-2004 07:07 AM

Re: Brian Schroeders chat example on windows
 
gabriele renzi wrote:

> Brian Schröder ha scritto:
>
>> Hello Robert,
>>
>> nice to hear, that you are using the course.

>
> > In my course there was one person with a windows system,
> > and his problem was, that the console only drew the received text,
> > when he hit return. So not usable as a chat client.
> > cmd seems to cache printed text while it is reading with gets.

>
>>
>> Regards,
>>
>> Brian

>
>
> isn't this an example of the know threading issues on windows?
> (basically, IO on non-sockets objects like the console is blocking).
>

Yep, that's it. Thanks to both of you for your answer.

Brian: Yes, I used parts I and III of your slides and provided pointers
to some other parts. Great material. I will send an url to this list
when I've cleaned up the info I used.

Thanks,

Robert





Mark Hubbart 11-05-2004 07:19 AM

Re: Brian Schroeders chat example on windows
 
On Fri, 5 Nov 2004 10:33:44 +0900, gabriele renzi
<rff_rff@remove-yahoo.it> wrote:
> Brian Schröder ha scritto:
>
>
> > Hello Robert,
> >
> > nice to hear, that you are using the course.
> > In my course there was one person with a windows system,
> > and his problem was, that the console only drew the received text,
> > when he hit return. So not usable as a chat client.
> > cmd seems to cache printed text while it is reading with gets.
> >
> > Regards,
> >
> > Brian

>
> isn't this an example of the know threading issues on windows?
> (basically, IO on non-sockets objects like the console is blocking).


This may be a dumb question, but if it's blocking IO that's the
problem, wouldn't IO#readpartial work, since it always returns
immediately?

hth,
Mark





All times are GMT. The time now is 09:41 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.