Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Crossplatform Process handling C library for IL2CPP

Discussion in 'Windows' started by Sammonius, Aug 9, 2023.

  1. Sammonius


    Mar 18, 2017
    Hi all,

    I need to start a process in IL2CPP in Windows, Linux, and Mac builds too. This process is a local server listening on a specific port. And I also need to connect to this server. It works in Mono, but not in IL2CPP. I read all posts I found on the internet on this topic and I think the solution could be using an external C lib (dll) that does the work on all platrforms.

    I need a C lib that is cross-platform and has these functionalities like .Net Process class:
    - Start a process on a specific port like" Process.Start()"
    - Get the standard output of the started process like "Process.OutputDataReceived"
    - Get errors of the process like" Process.ErrorDataReceived"

    I also need these functionalities to connect to the process like .Net TcpClient class:
    - Create a TCP connection like "new TcpClient(address, port)"
    - Set receive timeout like "client.ReceiveTimeout = 1000"
    - Set timeout like "client.SendTimeout = 1000"
    - Get stream like "stream = client.GetStream()"

    Could you guys suggest me a C lib like this or any other solution for the problem?

    Last edited: Aug 9, 2023