Ipc send problem

Hello. I have some c++ code

int sock = nn_socket(AF_SP, NN_PAIR);
    assert(sock>=0);
    assert(nn_connect(sock, URL)>=0);
    int to = 100;
    assert (nn_setsockopt (sock, NN_SOL_SOCKET, NN_RCVTIMEO, &to, sizeof (to)) >= 0);
    UE_LOG(LogClass, Log, TEXT("___SET SOCK OPTION___"));
    int sz_n = strlen (msg) + 1; // '\0'
    printf ("%d\n", sz_n);
    int bytes = nn_send (sock, msg, sz_n, 0);
    printf ("%d\n", bytes);
    assert(bytes >= 0 );

and I have node.js server.

If I call this code from standart c++ console application - everything is worked true, but if i call from ue4 project - i get delay for nn_send. What is my problem?
Best regards

Use UE4 socket APIs

A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums,Receive_Binary_Data_From_an_IP/Port_Into_UE4,(Full_Code_Sample)

Generly avoid using standard C++ or external libraries if UE4 APIs has what you want, it helps your code to work properly with UE4

ty very much for reply, but my architecture use ipc for communication launcher and game, and I use nanomsg libs for this. Can I use ue4 sockets for ipc?
Best regards.

If I would use UE4 TCP to connect between Unreal game client and my application running in the same host.
Does Unreal has blocking any TCP ports or not? @Shadowriver

Oh ok, hmmm then delay might be caused by something nanomsg or maybe size of UE4 is related to that? Because that only diffrence i can think of, UE4 does nothing to nanomsg and your module runs the same code, you used VS in both right? Maybe change “assert” to “check” as this is what i see in engine

I don’t think so, sockets are sockets and they can do what system allows