A wrapper for C socket API for more easier use.