Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read Pipe problem #123

Open
FynjyAC opened this issue Jun 25, 2019 · 9 comments
Open

Read Pipe problem #123

FynjyAC opened this issue Jun 25, 2019 · 9 comments

Comments

@FynjyAC
Copy link

FynjyAC commented Jun 25, 2019

Greetings.
I have a problem with the "write pipe" function in UE4.
I read the data from the "readPipe" without any problems. But when I try to send data "genmove b" through "writePipe", I get the same in the response in "readPipe".

  1. I create a process
    FProcHandle ProcessHandle = FPlatformProcess::CreateProc(tFilename, tArguments, false, false, false, NULL, 0, tWorkingDirectory, goWritePipe, goReadPipe);
  2. i wait 2 seconds
  3. Read from ReadPipe
    FString myOut = FPlatformProcess::ReadPipe(goReadPipe);
    I get all the initial information
  4. I wait 2 seconds
  5. I send a "genmove b" to the WritePipe
    if (FPlatformProcess::WritePipe(goWritePipe, "genmove b"))
  6. I wait 5 seconds and try ReadPipe. And I get "genmove b".
  7. But if I enter "genmove b" in the console of my process, I get all correct informations.

Could you give me any advice?

@lemonsqueeze
Copy link
Collaborator

Hi,

Could you give some context ? I have no idea what you're trying to do here.
What is UE4 ?

@FynjyAC
Copy link
Author

FynjyAC commented Jun 28, 2019

Hi. Thanks for participating
UE4 = Unreal Engine 4. Game Engine.
UE4 can use c++, but can't direct use windows library, windows.h.
Instead, UE4 created its own library of functions with own realizations
I'm trying to create a connection with pachi.exe through UE4 functions (in Windows used winApi pipe functions)
https://docs.microsoft.com/en-us/windows/desktop/ipc/about-pipes

@FynjyAC
Copy link
Author

FynjyAC commented Jun 28, 2019

The task is to transfer data between the Pachi and my c++ unreal engine project

@lemonsqueeze
Copy link
Collaborator

Try asking UE4 devs then, maybe they can help you with this ...

@FynjyAC
Copy link
Author

FynjyAC commented Jul 3, 2019

Ok, I'll ask from the another side.
How do you recommend to communicate with your program? Through pipe? Sockets? Or another ways?
Can you recommend a program that already works with patch?

@Pecka95
Copy link

Pecka95 commented Aug 23, 2022

Hey! Did you figure out wy its happens? I have the same problem and this thread the only one I found

Greetings. I have a problem with the "write pipe" function in UE4. I read the data from the "readPipe" without any problems. But when I try to send data "genmove b" through "writePipe", I get the same in the response in "readPipe".

@jmoudrik
Copy link
Contributor

@Pecka95 - are you using UE as well? This feels like a problem in Your/FynjyAC's platform, commanding pachi by std pipe works fine.

@Pecka95
Copy link

Pecka95 commented Aug 23, 2022

@Pecka95 - are you using UE as well? This feels like a problem in Your/FynjyAC's platform, commanding pachi by std pipe works fine.

Yeah, it's not about pachi, it's about Unreal Engine. Sorry for asking and botheting you here, but FynjyAC's problem it's the only one similar problem with mine which I could found and I don't know how to ask him directly

@jmoudrik
Copy link
Contributor

jmoudrik commented Aug 25, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants