2009/11/13 金曜日

Google GOのライブラリ(http)

カテゴリー: 未分類 — ryu @ 23:14:32

ライブラリっていうか標準パッケージね。
Google GO Package Directory

現状にしては結構充実かも。

結局のところサーバサイドでいくらNativeバイナリ作ったところで、
apacheからプロセス生成して実行じゃオーバーヘッドが・・・、
プロセス内で実行されるapxとかのプラグインでスクリプトのほうがって
思ったけど、標準でhttpサーバが入ってます。

HTTP/1.1対応、マルチスレッドでそこそこ使える感じ。

package main

import (
“http”;
“io”;
)

// hello world, the web server
func HelloServer(c *http.Conn, req *http.Request) {
io.WriteString(c, “hello, world!\n”);
}

func main() {
http.Handle(”/hello”, http.HandlerFunc(HelloServer));
err := http.ListenAndServe(”:12345″, nil);
if err != nil {
panic(”ListenAndServe: “, err.String())
}
}

12 件のコメント »

  1. not that much of a online reader to be honest but your sites really nice, keep it up! I’ll go ahead and bookmark your website to come back in the future. All the best
    canada boxing day down jacket sale http://www.lamaree.com.tw/upload/fckeditor/file/canada-goose/tkpcanada-boxing-day-down-jacket-sale88pv.asp

    コメント by canada boxing day down jacket sale — 2014/10/27 月曜日 @ 13:03:16

  2. 限り、私はあなたに戻って信用と情報源を提供するように|記事投稿公式サイトあなたの|私はいくつかのカップルを引用してもいい?マイブログサイトである全く同じ関心領域|だろ確かにあなたと私のユーザーが訪問者などの恩恵を受けるここ提供|あなたは現在の情報の一部|たくさん。私に知らせて下さいもしこの大丈夫あなたと。 よろしく!

    コメント by Chanel 通販 コスメ — 2014/11/7 金曜日 @ 18:01:36

  3. I just want to tell you that I’m very new to blogging and site-building and certainly enjoyed your web page. More than likely I’m want to bookmark your site . You surely come with awesome well written articles. Thanks a bunch for sharing with us your webpage.

    コメント by read this post here — 2015/4/16 木曜日 @ 5:58:15

  4. ery few websites that occur to become comprehensive beneath, from our point of view are undoubtedly nicely really worth checking out

    コメント by MIRA MI BLOG — 2015/7/5 日曜日 @ 6:33:36

  5. Hi there, yes brother there are obviously several blogging web sites にゃにゃん.と » Google GOのライブラリ(http) , but I advise you to use Google free blogging services.
    retro jordan 4 http://opalair.com.au/CONTACT-US/Contact-Us/4Retro.asp

    コメント by retro jordan 4 — 2015/7/25 土曜日 @ 13:08:00

  6. I gotta favorite this internet site it seems extremely helpful invaluable

    コメント by deski na ogrodzenie — 2015/9/2 水曜日 @ 1:59:54

  7. Superb post however I was wondering if you could write a litte more on this topic? I’d be very grateful if you could elaborate a little bit more. Many thanks!

    コメント by balustrady plastikowe — 2015/9/2 水曜日 @ 2:08:08

  8. Hmm is anyone else experiencing problems with the pictures on this blog loading? I’m trying to find out if its a problem on my end or if it’s the blog. Any suggestions would be greatly appreciated.

    コメント by sztachetki z PVC — 2015/9/2 水曜日 @ 2:10:15

  9. Aw, this was a very nice post. In thought I wish to put in writing like this additionally – taking time and actual effort to make a very good article… but what can I say… I procrastinate alot and certainly not appear to get one thing done.

    コメント by balustrady plastikowe — 2015/9/2 水曜日 @ 2:19:39

  10. Youre so cool! I dont suppose Ive read something like this before. So good to search out any individual with some unique ideas on this subject. realy thank you for beginning this up. this web site is one thing that is wanted on the net, somebody with just a little originality. useful job for bringing something new to the web!

    コメント by ogrodzenie pcv — 2015/9/2 水曜日 @ 2:40:09

  11. I and my buddies came reading through the great tricks found on your web blog then all of the sudden came up with a horrible feeling I never thanked the web blog owner for those secrets. All of the guys happened to be stimulated to read all of them and now have extremely been having fun with them. I appreciate you for actually being well accommodating and for getting this kind of incredible guides millions of individuals are really wanting to understand about. My very own sincere apologies for not expressing appreciation to you earlier.

    コメント by sztachety z pcv — 2015/9/2 水曜日 @ 3:02:20

  12. Article says the it has remained unchanged when compared to what they have

    コメント by baby-shower-invites — 2016/8/27 土曜日 @ 23:46:09

このコメント欄の RSS フィード トラックバック URL

コメントをどうぞ

38 queries. HTML convert time: 0.294 sec. Powered by WordPress 2.8