An irritating limitation of listening sockets

Traditional sockets implementations have an irritating limitation, atleast for TCP sockets: it is impossible to gracefully and cleanly shutdown listening (server) sockets.The problem is that kernels accept new TCP connections for listeningsockets without asking your server; accept() doesn't actually accept the connection, it just gives you the next one that the kernel hasalready accepted on your behalf.

This means that to shut down cleanly,you need a two-stage process: first you tell the kernel to stop acceptingnew connections


20070301網摘 – 空歡喜

空歡喜

篤vs督


不要輕言愛

聽說,我的生肖今年與太歲相害。

太歲主變動,那麼我可將近來的改變,歸咎於太歲。
_________________________________________

今季我在Lane Crawford預留了的鞋,到結帳提取的時候,

語文與討論

早前跟友人談到一些語文和討論的問題,在此整理一下自己的想法。當然,我不是語文專家,只是純粹思考訓練而已,也可能說得不對。

毫無疑問地,語文是人類最重要的工具之一。通過語文,我們可以將抽象的想法,簡化成文


如果我們是一盤三文魚


香港《信報》副刊“文耕草莽”專欄作者文啟明今日以“自助餐”為題談澳門,抄錄在此與大家分享:

前文說到澳門已日漸受到內地通俗生活文化入侵。那是否代表澳門的輝煌都是虛有其表呢?不,幾間全新開幕的賭場或酒店,

電影節

《字花》的排版男是全日制本科生,我問他訂了多少場,他說9場,我便說他愧對學生折扣。他回咀道我已經買*好*了。哼的確對於沒有信用咭的人來說,開步的時候總是一片混亂。哼哼總之現在已經搞掂,但《離奇過小說》

Using Unix domain sockets from Python

Using Unix domain sockets from Python's socket module is prettyeasy, but underdocumented. Since I've done it (and I may want to doit again sometime):

  • you need to create the socket with an explicit family of AF_UNIX .I usually go whole-hog and explicitly specify SOCK_STREAM as well.

  • the address argument to .bind() and .connect() is the path ofthe Unix socket file. For .bind() , the file can't already exist

我的初吻

這不是一個甜蜜的故事。

初吻,理所當然,給了初戀情人。

那一年,我二十歲。

男友比我大十年,經驗老到。

小情侶手拖手回家,在我家樓下的鐵閘外,他毫無先兆的,就這樣吻下來。

那是一個很長的吻,由不知所措,到懂得配

仍然未搬得動屋的一次過

1.
文明單位:中文
嘉賓:雷競旋

節目外推介: 陳光興《去帝國:亞洲作為方法》
殖民問題現在在香港的狀況是這樣:除非特意很專注地去談,否則它永遠是被壓到最低難以提及的。而特意很專注地去去談呢,又感覺過於學院而

Things I did not know about until recently: Ethernet splitters

Real cat-5 wiring, such as what they run through the walls of buildings,has eight wires; 100 Mbps and 10 Mbps Ethernet use four wires. If youhave fixed cat-5 runs that you can't afford to add to, and you reallyneed additional ports in places that already have one, and you can'tafford to buy switches, you can take advantage of this to double uptwo Ethernet ports onto a single cat-5 run.

That's an Ethernet