public final class TCPClient extends Client
| Constructor and Description |
|---|
TCPClient()
Initialize a default client that
will connect to local server at
default port 49305
|
TCPClient(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
|
TCPClient(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
|
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
|
Client |
debug(boolean status)
Set the client debug status
|
String |
description()
Karma source description
|
String |
getMAC()
Get the client MAC address
|
String |
getName()
Get the client name
|
RemoteServer |
getServer()
Get the connected remote server
|
WorkLevel |
getWorkLevel()
Get the client work level
|
String |
name()
Karma source name
|
void |
rename(String name)
Rename the client on the server interface
|
void |
send(byte[] data)
Send data to the server
|
String |
updateURL()
Karma source update URL
|
String |
version()
Karma source version
|
public TCPClient()
public TCPClient(String server_host, int server_port)
server_host - the serverserver_port - the server portpublic TCPClient(int client_port,
String server_host,
int server_port)
client_port - the client portserver_host - the serverserver_port - the server portpublic Client debug(boolean status)
public 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 RemoteServer getServer()
public WorkLevel getWorkLevel()
getWorkLevel 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.