Forum: Ruby net/http

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
String numecal validate! (Guest)
on 2006-04-20 22:59
Hello
I can create a server in ruby...that server need listening in port 80
wait for requisition, but i dont have idea, How I do that?


Thank's
Justin C. (Guest)
on 2006-04-20 23:09
(Received via mailing list)
String numecal validate! wrote:
> Hello
> I can create a server in ruby...that server need listening in port 80
> wait for requisition, but i dont have idea, How I do that?
>
>
> Thank's
>
Net/HTTP is for connecting to a server.

Try using the GServer
(http://ruby-doc.org/stdlib/libdoc/gserver/rdoc/cla...)
standard library to create a generic server, if that's what you are
trying to do?

-Justin
Tanner B. (Guest)
on 2006-04-20 23:18
(Received via mailing list)
On 4/20/06, String numecal validate! <removed_email_address@domain.invalid> 
wrote:
>
>
[off topic rant]]No offense to this poster whatsoever, but I knew from
the
title/"username" that this would come from the ruby-forum bridge.  And
as
mentioned in a previous topic today, I think this sort of thing is
exactly
why rubyforum needs to either put a large disclaimer as to it's actual
use,
or be split from the mailing list / newsgroup.

Now to answer the original poster.  Look at the TCPServer class, or
possibly
into using WEBrick if you're just needing a simple HTTP server.  If you
search the archives of this mailing list, or the comp.lang.ruby
newsgroup
you should be able to find plenty of information on writing server
applications.
This topic is locked and can not be replied to.