public final class SSLClient extends SecureClient
| Constructor and Description |
|---|
SSLClient(String pwd,
String nm,
String ext,
String tp)
Initialize a default client that
will connect to local server at
default port 49305
|
SSLClient(String pwd,
String nm,
String ext,
String tp,
int client_port,
String server_host,
int server_port)
Initialize a client with a custom port
that will connect to the specified server at the
specified port
|
SSLClient(String pwd,
String nm,
String ext,
String tp,
String server_host,
int server_port)
Initialize a client that will connect
to the specified server at specified port
|
| Modifier and Type | Method and Description |
|---|---|
String[] |
authors()
Karma source authors
|
SecureClient |
certsLocation(Path location)
Set the certificates location
|
void |
close()
Close the connection
|
ml.karmaconfigs.api.common.timer.scheduler.LateScheduler<Boolean> |
connect()
Try to connect to the server
|
ml.karmaconfigs.api.common.timer.scheduler.LateScheduler<Boolean> |
connect(String accessKey)
Try to connect to the server
|
SecureClient |
debug(boolean status)
Set the client debug status
|
String |
description()
Karma source description
|
InetAddress |
getHost()
Get the client address
|
String |
getMAC()
Get the client MAC address
|
String |
getName()
Get the client name
|
int |
getPort()
Get the client port
|
RemoteServer |
getServer()
Get the connected remote server
|
WorkLevel |
getWorkLevel()
Get the client work level
|
boolean |
isConnected()
Get if the client is completely connected
to the server
|
boolean |
isConnecting()
Get if the client is trying to connect to the
server
|
String |
name()
Karma source name
|
SecureClient |
protocol(String p)
Set the current protocol
|
void |
rename(String name)
Rename the client on the server interface
|
void |
send(byte[] data)
Send data to the server
|
boolean |
sendMessage(MessageOutput message)
Send a message to the client
|
String |
updateURL()
Karma source update URL
|
String |
version()
Karma source version
|
toStringpublic SSLClient(String pwd, String nm, String ext, String tp)
public SSLClient(String pwd, String nm, String ext, String tp, String server_host, int server_port)
server_host - the serverserver_port - the server portpublic SSLClient(String pwd, String nm, String ext, String tp, int client_port, String server_host, int server_port)
client_port - the client portserver_host - the serverserver_port - the server portpublic SecureClient debug(boolean status)
debug in class SecureClientstatus - the client debug statuspublic SecureClient protocol(String p)
protocol in class SecureClientp - the protocolpublic SecureClient certsLocation(Path location)
certsLocation in class SecureClientlocation - the certificates locationpublic ml.karmaconfigs.api.common.timer.scheduler.LateScheduler<Boolean> connect()
public ml.karmaconfigs.api.common.timer.scheduler.LateScheduler<Boolean> connect(String accessKey)
public String getName()
public String getMAC()
public InetAddress getHost()
getHost in class RemoteClientpublic int getPort()
getPort in class RemoteClientpublic boolean sendMessage(MessageOutput message)
sendMessage in class RemoteClientmessage - the message to sendpublic RemoteServer getServer()
public WorkLevel getWorkLevel()
getWorkLevel in class Clientpublic boolean isConnecting()
isConnecting in class Clientpublic boolean isConnected()
isConnected in class Clientpublic void rename(String name)
public void send(byte[] data)
public String name()
public String version()
public String description()
public String[] authors()
public String updateURL()
Copyright © 2022. All rights reserved.