util tools, include socket, thread