{"id":48680796,"url":"https://github.com/mashupbots/socko","last_synced_at":"2026-04-26T20:00:41.286Z","repository":{"id":2860009,"uuid":"3864805","full_name":"mashupbots/socko","owner":"mashupbots","description":"A Scala web server powered by Netty networking and AKKA processing.","archived":false,"fork":false,"pushed_at":"2023-09-22T17:51:40.000Z","size":9994,"stargazers_count":256,"open_issues_count":15,"forks_count":51,"subscribers_count":27,"default_branch":"master","last_synced_at":"2024-03-26T10:13:27.100Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mashupbots.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-03-29T10:06:28.000Z","updated_at":"2024-02-06T10:13:43.000Z","dependencies_parsed_at":"2022-07-31T13:59:14.172Z","dependency_job_id":null,"html_url":"https://github.com/mashupbots/socko","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/mashupbots/socko","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mashupbots%2Fsocko","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mashupbots%2Fsocko/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mashupbots%2Fsocko/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mashupbots%2Fsocko/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mashupbots","download_url":"https://codeload.github.com/mashupbots/socko/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mashupbots%2Fsocko/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32310804,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T19:15:34.056Z","status":"ssl_error","status_checked_at":"2026-04-26T19:15:15.467Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-11T01:00:36.065Z","updated_at":"2026-04-26T20:00:41.279Z","avatar_url":"https://github.com/mashupbots.png","language":"Scala","funding_links":[],"categories":["网络编程"],"sub_categories":["Spring Cloud框架"],"readme":"# SOCKO\n\nSocko is an embedded [Scala](http://www.scala-lang.org/) web server powered by\n[Netty](http://netty.io/) networking and [Akka](http://akka.io/) processing.\n\n**Please see our [web site](http://sockoweb.org/) for documentaiton and more information**\n\n## A quick example\n\n```scala\n    object HelloApp extends Logger {\n      //\n      // STEP #1 - Define Actors and Start Akka\n      // See `HelloHandler`\n      //\n      val actorSystem = ActorSystem(\"HelloExampleActorSystem\")\n\n      //\n      // STEP #2 - Define Routes\n      // Dispatch all HTTP GET events to a newly instanced `HelloHandler` actor for processing.\n      // `HelloHandler` will `stop()` itself after processing each request.\n      //\n      val routes = Routes({\n        case GET(request) =\u003e {\n          actorSystem.actorOf(Props[HelloHandler]) ! request\n        }\n      })\n\n      //\n      // STEP #3 - Start and Stop Socko Web Server\n      //\n      def main(args: Array[String]) {\n        val webServer = new WebServer(WebServerConfig(), routes, actorSystem)\n        webServer.start()\n\n        Runtime.getRuntime.addShutdownHook(new Thread {\n          override def run { webServer.stop() }\n        })\n\n        System.out.println(\"Open your browser and navigate to http://localhost:8888\")\n      }\n    }\n\n    /**\n     * Hello processor writes a greeting and stops.\n     */\n    class HelloHandler extends Actor {\n      def receive = {\n        case event: HttpRequestEvent =\u003e\n          event.response.write(\"Hello from Socko (\" + new Date().toString + \")\")\n          context.stop(self)\n      }\n    }\n```\n\n## Editing the Source Code\n\n* We are currently using [Eclipse Juno](http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/junosr1) \n  with [Scala IDE 3.0](http://scala-ide.org/download/current.html)\n\n* We are currently using Scala 2.10.1 and JDK7. You will need JDK7 to build.\n  The core and rest projects will be compiled for use with JDK6 but SPDY will \n  not be supported.\n\n* Generate eclipse project files: `sbt eclispse`\n\n* Start `Eclipse`\n\n* From the top menu, select `File` | `Import`\n  * Select `General` | `Existing Projects into Workspace`. \n  * Click `Next`.\n  * Select the `socko` source code directory as the root\n  * Should see `socko-examples` and `socko-webserver` under `Projects`\n  * Click `Finish`\n\n* To run the scalatest unit test cases, just right click on a test class file and select `Run As JUnit Test`.\n\n## Getting Help\n\nIf you have a question or need help, please open a ticket in our [Issues Register] (https://github.com/mashupbots/socko/issues).\n\n## Links\n\n* [Web Site](http://sockoweb.org/)\n* [Blog](http://sockoweb.org/blog)\n* [Issues] (https://github.com/mashupbots/socko/issues/)\n* [Road Map](https://github.com/mashupbots/socko/issues/milestones)\n* [Examples](https://github.com/mashupbots/socko/tree/master/socko-examples/src/main/scala/org/mashupbots/socko/examples)\n\n  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmashupbots%2Fsocko","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmashupbots%2Fsocko","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmashupbots%2Fsocko/lists"}