How to use windows Socket instead of FSocket in UE4 project? is it possible?

I am using AirSim project. I want to transfer images with TCP. But I am not good at using FSocket. How to use windows Socket instead of FSocket in UE4 project? is it possible?

My best guess is that you may use WinSock2 in UE4 project. You do not have to do anything special. I’ve tried the following:

Created a c++ actor, and added a WinSock example in it’s BeginPlay

void AWSActor::BeginPlay()
{
    Super::BeginPlay();
    WSADATA wsaData;
    int iResult;
    iResult = WSAStartup(MAKEWORD(2, 2), &wsaData);
    if (iResult != 0) {
        printf("WSAStartup failed: %d\n", iResult);
    }
}

added the necessary includes (winsock2.h and ws2tcpip.h), and checked the iResult variable. It was 0 so I guess everything worked.

I’ve read somewhere that UE depends on WinSock2, so it should link to ws2_32.lib, and there should be no problem.

Although I encourage you to learn and use UE sockets.

Did you get it finished?
I would like to know how to get the image and how to transfer the image.

I am trying the same.