Skip to content

dileepagayan/TCP-Client-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TCP-Client-Server

Custom Client Server Implementation With Thread Pool And Queue

Server

  • Theadpool

  • Task Executor

  • Request

  • Linked List Queue

ThreadPool class creating fixed number of threads and runs TaskExecutor. New requests will be queued to the Linked List Queue and Threads are handling the requests accordingly

Client

Multi threaded client program

Instruction to run program

Client -sh startClient.sh {PORT} {numberOfClients}

Ex :sh startClient.sh 20

Server -sh startServer.sh {serverPort} {queueSize} {numberOfThreads} {RequestWaitTimeOnServer}

Ex:- sh startServer.sh 9000 10 5 1

RequestWaitTimeOnServer - if this parameter is not 0 it will sleep the request task for number of seconds.

References :-

http://tutorials.jenkov.com/java-concurrency/thread-pools.html

http://tutorials.jenkov.com/java-multithreaded-servers/thread-pooled-server.html

http://www.makeinjava.com/custom-thread-pool-example-without-using-executor-framework/

http://oppansource.com/implementing-own-thread-pool-in-java/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors