Bind socket to localhost via C style struct