Skip to content
An example of a TCP service written in groovy.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config/codenarc
src
.gitignore
README.md
build.gradle

README.md

This is an example how to implement an TCP client for the sweet productivity server. With this base class you can implement own groovy TCP services like this greeting service, but since groovy lives in the JVM it is recommended to build a jvm service.

If you want to run a TCP service, you have to place it in the "server/service-tcp/" directory and add this this to your "server/services.json" file:

{
	"id":"YOUR SERVICE",
	"exec":[
		"java",
		"-jar",
		"YOUR_SERVICE.jar"
	],
	"dir":"services-tcp/"
}

This is a complete and valid services.json file as an example:

[
    {
        "id":"greeting-groovy-tcp",
        "exec":[
            "java",
            "-jar",
            "greeting-groovy-tcp-0.1.jar"
        ],
        "dir":"services-tcp/"
    },
    {
        "id":"git",
        "clazz": "org.hoschi.sweetp.services.git.GitService"
    }
]
You can’t perform that action at this time.