Reputation: 16769
what is the purpose of scala.tools.util.SocketServer?
Upvotes: 3
Views: 338
Reputation: 6888
It's part of the compiler, and not a part of the standard scala library.
Its purpose is to implement the server communication for the fsc (fast scala compiler). When you're compiling with fsc
a server daemon process is started. This is done by starting up the scala.tools.nsc.StandardCompilerServer
, which is a subclass of scala.tools.util.SocketServer
. Once the fsc server is running, you avoid the overhead of having to start up a new JVM instance with every compilation that you do, which happens when you use scalac
instead of fsc
to compile your code.
Upvotes: 10