I can't think of anything.  perhaps a file that contains all socket.io interaction? in that case you can define a function "socket_send_to(data, recipient)" and send_data could simply call that function