Here are two wikis by Rama: TCP: https://wiki.unrealengine.com/TCP_Socket_Listener,Receive_Binary_Data_From_an_IP/Port_Into_UE4,%28Full_Code_Sample%29
UDP:https://wiki.unrealengine.com/UDP_Socket_Sender_Receiver_From_One_UE4_Instance_To_Another