C Socket interface