Throw not-implemented if necessary.

Add socket macros.