convert socket callback declarations to use typedefs for function pointer types