Class KSocketServerThreadSample
java.lang.Object
java.lang.Thread
ch.k43.util.KSocketServerThread
ch.k43.util.KSocketServerThreadSample
- All Implemented Interfaces:
AutoCloseable,Runnable
Simple upper case echo server to show a sample KSocketServerThread implementation.
Notes:
- Use "openssl s_client -connect hostname:9998" (linux) on client to test TLS server.
- Use "telnet hostname 9999" (windows) or "nc hostname 9999" (linux) on client to test non-TLS server.
- Use "openssl s_client -connect hostname:9998" (linux) on client to test TLS server.
- Use "telnet hostname 9999" (windows) or "nc hostname 9999" (linux) on client to test non-TLS server.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class ch.k43.util.KSocketServerThread
close, getAuthenticatedClient, getAuthenticatedClientCN, getCiphers, getLastError, getProtocol, isConnected, isDataAvailable, isSecuredConnection, read, readLine, write, write, write, writeLineMethods inherited from class java.lang.Thread
activeCount, checkAccess, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, threadId, yield
-
Constructor Details
-
KSocketServerThreadSample
Thread constructor.- Parameters:
argSocket- Socket passed by the KSocketServerListener during thread initialization
-
-
Method Details
-
run
public void run()Thread main entry point (called by KSocketServerListener).- Specified by:
runin interfaceRunnable- Overrides:
runin classKSocketServerThread
-
toString
String representation of object.- Overrides:
toStringin classKSocketServerThread- Since:
- 2024.08.23
-