1 package be
.nikiroo
.utils
.serial
.server
;
3 import java
.io
.IOException
;
4 import java
.net
.Socket
;
5 import java
.net
.UnknownHostException
;
7 import be
.nikiroo
.utils
.Version
;
10 * Class used for the client basic handling.
12 * It represents a single action: a client is expected to only execute one
17 public class ConnectActionClientString
extends ConnectActionClient
{
19 * Create a new {@link ConnectActionClientString} with the current
20 * application version (see {@link Version#getCurrentVersion()}) as the
24 * the socket to bind to
26 public ConnectActionClientString(Socket s
) {
31 * Create a new {@link ConnectActionClientString} with the current
32 * application version (see {@link Version#getCurrentVersion()}) as the
40 * TRUE for an SSL connection, FALSE for plain text
43 * in case of I/O error
44 * @throws UnknownHostException
45 * if the IP address of the host could not be determined
46 * @throws IllegalArgumentException
47 * if the port parameter is outside the specified range of valid
48 * port values, which is between 0 and 65535, inclusive
50 public ConnectActionClientString(String host
, int port
, boolean ssl
)
52 super(host
, port
, ssl
);
56 * Create a new {@link ConnectActionClientString}.
63 * TRUE for an SSL connection, FALSE for plain text
68 * in case of I/O error
69 * @throws UnknownHostException
70 * if the IP address of the host could not be determined
71 * @throws IllegalArgumentException
72 * if the port parameter is outside the specified range of valid
73 * port values, which is between 0 and 65535, inclusive
75 public ConnectActionClientString(String host
, int port
, boolean ssl
,
76 Version version
) throws IOException
{
77 super(host
, port
, ssl
, version
);
81 * Create a new {@link ConnectActionClientString}.
84 * the socket to bind to
88 public ConnectActionClientString(Socket s
, Version version
) {
93 * Send the given object to the server (and return the answer).
98 * @return the answer, which can be NULL
100 * @throws IOException
101 * in case of I/O error
103 public String
send(String data
) throws IOException
{
104 return action
.sendString(data
);