public final class SSLServer extends SecureServer
| Constructor and Description |
|---|
SSLServer(String pwd,
String nm,
String ext,
String tp)
Initialize a default client that
will connect to local server at
default port 49305
|
SSLServer(String pwd,
String nm,
String ext,
String tp,
int port)
Initialize a client with a custom port
that will connect to the specified server at the
specified port
|
SSLServer(String pwd,
String nm,
String ext,
String tp,
String host,
int port)
Initialize a client that will connect
to the specified server at specified port
|
| Modifier and Type | Method and Description |
|---|---|
SecureServer |
allowedCiphers(String... c)
Set the allowed ciphers
|
SecureServer |
allowedProtocol(String... p)
Set the allowed protocols
|
String[] |
authors()
Karma source authors
|
void |
ban(String... macAddresses)
Ban an address from the server
|
void |
broadcast(MessageOutput data)
Send a message to each connected client
|
SecureServer |
certsLocation(Path location)
Set the certificates location
|
void |
close()
Close the connection
|
ml.karmaconfigs.api.common.Console |
console()
Get the source out
|
SecureServer |
debug(boolean status)
Set the server debug status
|
String |
description()
Karma source description
|
void |
exportBans(Path destination)
Export the list of bans
|
Set<RemoteClient> |
getClients()
Get the connected clients
|
String |
getMAC()
Get the server MAC address
|
WorkLevel |
getWorkLevel()
Get the client work level
|
void |
kick(String... macAddresses)
Kick an address from the server
|
void |
loadBans(Path bans)
Load the list of bans
|
SecureServer |
maxConnections(int m)
Set the server max connections
|
String |
name()
Karma source name
|
SecureServer |
protocol(String p)
Set the current protocol
|
void |
redirect(String name,
MessageOutput data)
Redirect a message to the specified client
|
ml.karmaconfigs.api.common.timer.scheduler.LateScheduler<Boolean> |
start()
Try to start the server
|
ml.karmaconfigs.api.common.timer.scheduler.LateScheduler<Boolean> |
start(String accessKey)
Try to start the server
|
void |
unBan(String... macAddresses)
Unban an address from the server
|
String |
updateURL()
Karma source update URL
|
String |
version()
Karma source version
|
public SSLServer(String pwd, String nm, String ext, String tp)
pwd - the certificate passwordnm - the certificate base nameext - the certificate file extensiontp - the certificate typepublic SSLServer(String pwd, String nm, String ext, String tp, int port)
pwd - the certificate passwordnm - the certificate base nameext - the certificate file extensiontp - the certificate typeport - the server portpublic SSLServer(String pwd, String nm, String ext, String tp, String host, int port)
pwd - the certificate passwordnm - the certificate base nameext - the certificate file extensiontp - the certificate typehost - the serverport - the server portpublic SecureServer debug(boolean status)
debug in class SecureServerstatus - the server debug statuspublic SecureServer protocol(String p)
protocol in class SecureServerp - the protocolpublic SecureServer maxConnections(int m)
maxConnections in class SecureServerm - the server max connections amountpublic SecureServer allowedProtocol(String... p)
allowedProtocol in class SecureServerp - the protocolspublic SecureServer allowedCiphers(String... c)
allowedCiphers in class SecureServerc - the cipherspublic SecureServer certsLocation(Path location)
certsLocation in class SecureServerlocation - the certificates locationpublic ml.karmaconfigs.api.common.timer.scheduler.LateScheduler<Boolean> start()
public ml.karmaconfigs.api.common.timer.scheduler.LateScheduler<Boolean> start(String accessKey)
public String getMAC()
public Set<RemoteClient> getClients()
getClients in class Serverpublic WorkLevel getWorkLevel()
getWorkLevel in class Serverpublic void exportBans(Path destination)
exportBans in class Serverdestination - the file were to store
the ban listpublic void loadBans(Path bans)
public void broadcast(MessageOutput data)
public void redirect(String name, MessageOutput data)
public void ban(String... macAddresses)
public void kick(String... macAddresses)
public void unBan(String... macAddresses)
public String name()
public String version()
public String description()
public String[] authors()
public String updateURL()
public ml.karmaconfigs.api.common.Console console()
Copyright © 2022. All rights reserved.