Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
Building a Chat application in Ruby
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="David Masover, post: 4676551"] GServer is a TCP server. It's not a webserver. You can certainly build a=20 webserver on top of it, but I don't know why you would, when there's five o= r=20 ten good webservers for Ruby already, available as gems. =46rom your code, it sure doesn't look like you've written a webserver, so = maybe=20 open a terminal and type: nc localhost 1234 =2E..except that's probably going to just quit, since you don't actually ev= er=20 write anything, as far as I can tell. Since it's a GServer example, I'm guessing you want something like netcat. Also, it looks like the "serve" method is designed to be an entire TCP=20 connection, so if you were intending this to be a persistent connection (as= =20 you'd have with a chat server), you'd need some sort of loop, as in the=20 original code. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
Building a Chat application in Ruby
Top