fix function types of main loop funcs in sockets tests