1 package be
.nikiroo
.utils
.serial
.server
;
3 import java
.io
.IOException
;
4 import java
.net
.Socket
;
6 import be
.nikiroo
.utils
.Version
;
9 * Class used for the client basic handling.
11 * It represents a single action: a client is expected to only execute one
16 public class ConnectActionClientString
extends ConnectActionClient
{
18 * Create a new {@link ConnectActionClientString} with the current
19 * application version (see {@link Version#getCurrentVersion()}) as the
23 * the socket to bind to
25 public ConnectActionClientString(Socket s
) {
30 * Create a new {@link ConnectActionClientString} with the current
31 * application version (see {@link Version#getCurrentVersion()}) as the
39 * TRUE for an SSL connection, FALSE for plain text
42 * in case of I/O error when creating the socket
44 public ConnectActionClientString(String host
, int port
, boolean ssl
)
46 super(host
, port
, ssl
);
50 * Create a new {@link ConnectActionClientString}.
57 * TRUE for an SSL connection, FALSE for plain text
62 * in case of I/O error when creating the socket
64 public ConnectActionClientString(String host
, int port
, boolean ssl
,
65 Version version
) throws IOException
{
66 super(host
, port
, ssl
, version
);
70 * Create a new {@link ConnectActionClientString}.
73 * the socket to bind to
77 public ConnectActionClientString(Socket s
, Version version
) {
82 * Send the given object to the server (and return the answer).
87 * @return the answer, which can be NULL
90 * in case of I/O error
92 public String
send(String data
) throws IOException
{
93 return action
.sendString(data
);