-
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
e74d1f2
commit 306288a
Showing
5 changed files
with
81 additions
and
22 deletions.
There are no files selected for viewing
4 changes: 3 additions & 1 deletion
4
proxy/src/main/java/me/mrnavastar/protoweaver/proxy/ServerSupplier.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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
package me.mrnavastar.protoweaver.proxy; | ||
|
||
import me.mrnavastar.protoweaver.proxy.api.ProtoServer; | ||
|
||
import java.net.SocketAddress; | ||
import java.util.List; | ||
|
||
public interface ServerSupplier { | ||
|
||
List<SocketAddress> getServers(); | ||
List<ProtoServer> getServers(); | ||
} |
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
23 changes: 22 additions & 1 deletion
23
proxy/src/main/java/me/mrnavastar/protoweaver/proxy/api/ProtoServer.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 |
---|---|---|
@@ -1,5 +1,26 @@ | ||
package me.mrnavastar.protoweaver.proxy.api; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
import me.mrnavastar.protoweaver.api.netty.ProtoConnection; | ||
|
||
public record ProtoServer(String name, ProtoConnection connection) {} | ||
import java.net.SocketAddress; | ||
|
||
@Setter | ||
@Getter | ||
public class ProtoServer { | ||
|
||
private final String name; | ||
private final SocketAddress address; | ||
private ProtoConnection connection; | ||
|
||
public ProtoServer(String name, SocketAddress address) { | ||
this.name = name; | ||
this.address = address; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return name + " : " + address; | ||
} | ||
} |