From 86d3f93ee338b28ab7d40aa83c129cf6b97ef4b7 Mon Sep 17 00:00:00 2001 From: dweller Date: Sat, 9 Mar 2024 00:55:36 +0200 Subject: Initial commit, 2 years later --- java/sources/digital/cabin/ezipc/EzIPCServer.java | 33 +++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 java/sources/digital/cabin/ezipc/EzIPCServer.java (limited to 'java/sources/digital/cabin/ezipc/EzIPCServer.java') diff --git a/java/sources/digital/cabin/ezipc/EzIPCServer.java b/java/sources/digital/cabin/ezipc/EzIPCServer.java new file mode 100644 index 0000000..f490770 --- /dev/null +++ b/java/sources/digital/cabin/ezipc/EzIPCServer.java @@ -0,0 +1,33 @@ +package digital.cabin.ezipc; + + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; + + +public class EzIPCServer extends EzIPC +{ + public EzIPCServer(String connPath) throws IOException + { + super(connPath); + } + + public void open() throws IOException + { + super.in_pipe = new FileInputStream(super.connPath + "_c2s"); + super.out_pipe = new FileOutputStream(super.connPath + "_s2c"); + } + + public void close() throws IOException + { + super.close(); + + File fc2s = new File(super.connPath + "_c2s"); + fc2s.delete(); + + File fs2c = new File(super.connPath + "_s2c"); + fc2s.delete(); + } +} -- cgit v1.2.3