-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to teleport qubits from Java node to Python node
- Loading branch information
Showing
4 changed files
with
129 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.gluonhq.strange.cqc; | ||
|
||
import java.io.IOException; | ||
import java.io.OutputStream; | ||
import java.net.Socket; | ||
|
||
public class AppSession { | ||
|
||
private Socket socket; | ||
private OutputStream os; | ||
|
||
public AppSession() { | ||
|
||
} | ||
|
||
public OutputStream connect(String host, int port) throws IOException { | ||
System.err.println("Connecting to " + host + ":" + port); | ||
Socket socket = new Socket(host, port); | ||
System.err.println("socket created: " + socket); | ||
this.socket = socket; | ||
this.os = socket.getOutputStream(); | ||
return this.os; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters