summaryrefslogtreecommitdiff
path: root/java/sources/digital/cabin/ezipc/EzIPCServer.java
blob: f490770e7fc939c47a892f872f741c7225b30f73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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();
    }
}