[gnet-devel] I/O redirect to GTcpSocket



I'm wandering how to redirect stdin/stdout/stderr to GTcpSocket by
using dup/dup2 POSIX AIP.

I knew GTcpSocket struct should be considered as a blackbox, but
to achieve the above goal, I need to get internal socket descriptor.
And gnet API can do that ?

I'm using gnet as cross platform between Linux/Win32 ... I think
instead of getting the internel socket descriptor, it's better have
API like gnet_dup() or gnet_dup2() ....  any comment ?

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]