-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0361e4b
commit 15b2f56
Showing
6 changed files
with
225 additions
and
207 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
src/main/java/com/limechain/network/protocol/BaseEngine.java
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,16 @@ | ||
package com.limechain.network.protocol; | ||
|
||
import com.limechain.network.ConnectionManager; | ||
import io.libp2p.core.PeerId; | ||
import io.libp2p.core.Stream; | ||
|
||
public abstract class BaseEngine { | ||
|
||
protected final ConnectionManager connectionManager = ConnectionManager.getInstance(); | ||
|
||
protected abstract void handleHandshake(byte[] message, PeerId peerId, Stream stream); | ||
|
||
public abstract void receiveRequest(byte[] message, Stream stream); | ||
|
||
public abstract void writeHandshakeToStream(Stream stream, PeerId peerId); | ||
} |
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
Oops, something went wrong.