use stream_descriptor, but i didn't work well