-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: Delegate connection details
- Loading branch information
Bytekeeper
committed
Oct 2, 2020
1 parent
179fb2d
commit 4ee6c22
Showing
4 changed files
with
250 additions
and
145 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
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,32 @@ | ||
package bwapi; | ||
|
||
import java.io.IOException; | ||
import java.nio.ByteBuffer; | ||
|
||
interface ClientConnection { | ||
void disconnect(); | ||
|
||
ByteBuffer getGameTable(); | ||
|
||
ByteBuffer getSharedMemory(int serverProcID); | ||
|
||
void connectSharedLock(int serverProcID) throws Exception; | ||
|
||
void waitForServerReady() throws IOException; | ||
|
||
void waitForServerData() throws Exception; | ||
|
||
void submitClientData() throws IOException; | ||
} | ||
|
||
class SharedMemoryConnectionError extends RuntimeException { | ||
public SharedMemoryConnectionError(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
} | ||
|
||
class SharedLockConnectionError extends RuntimeException { | ||
public SharedLockConnectionError(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
} |
Oops, something went wrong.