Tuesday, October 17, 2006

the return value of ACE_SOCK_Stream

The "_n()" I/O methods keep looping until all the data has been transferred. These methods also work for sockets in non-blocking mode i.e., they keep looping on EWOULDBLOCK. is used to make sure we keep making progress, i.e., the same timeout value is used for every I/O operation in the loop and the timeout is not counted down.

The return values for the "*_n()" methods match the return values from the non "_n()" methods and are specified as follows:
*- On complete transfer, the number of bytes transferred is returned.
* - On timeout, -1 is returned, errno == ETIME.
* - On error, -1 is returned, errno is set to appropriate error.
* - On EOF, 0 is returned, errno is irrelevant.

Tuesday, September 26, 2006

Install perl module in CPAN

Just a simple line:

perl -MCPAN -e 'install "IO::Socket::SSL"'

all are ok!

Monday, September 11, 2006

ubuntu crashed

After months no-stopping running, my vaio, which runs xubuntu, was crashed this morning. I haven't see any screen like this before, and my remote connection from office to vaio was failed for times today.

When i boot my vaio, this screen appears.(I have not start X yet.) . All tty fill with the green blocks and have not place for my input. It's strange..

vaio, with crashing in ubuntu

Friday, September 01, 2006

Buy books without thinking...

From today, a huge bookshop near my office take 30% off for all books. So I can't help myself go into the big shop and take three books out:(..
  1. Lolita, by Vladimir Nabokov. I hope I can finish it as i wish.
  2. Distributed System: concept and design.Hum ,it's my homework:) Come on!
  3. Understand linux kernel, 3rd edition.. God bless me...

Be honest, I have no idea when I can finish reading all these stuffs above and the other stuffs just lied on my bookshelfs...

Saturday, August 26, 2006

Package management in os x

Since I got my macbook, I wanna reuse my experiences in some other unix platforms, such as debian/ubuntu, freebsd. From those system, I know a package management machicsm is goodies for one system. So I try to look for something alike in os x.

I got two solution:
MacPorts, which used to be called "darwinports". It is like port in Freebsd, which maintains a souce tree of whole system. When you wanna install a package, you just input "sudo port install foo", then it will check the source tree and download the source and compile in your machine, so you could make configure of the package for your puspose. If you wanna update all source tree, just enter "sudo port sync". It's simple and clean. I prefer macports than fink. But its disadvantage is that the packages are less than fink.

Fink, something like "apt-get" in debian/ubuntu. It provides precompiled binary package in remote servers. Though my another laptop runs ubuntu as a server that provides web, svn services, I still like macports, the freebsd style package management.

Tuesday, August 22, 2006

Switch from blgger.com to here

Try this new blog and I will use it as my personal blog if all stuff work right. And I hope blogspot.com will be always availble ...