quickshell-web/modules_old/Quickshell.Io/SocketServer.json
2024-09-28 02:35:19 +03:00

41 lines
1.9 KiB
JSON

{
"name": "SocketServer",
"module": "Quickshell.Io",
"type": "class",
"super": {
"type": "qt",
"module": "qml.QtQml",
"name": "QtObject"
},
"description": "Unix socket server.",
"details": "#### Example\n```qml\nSocketServer {\n active: true\n path: \"/path/too/socket.sock\"\n handler: Socket {\n onConnectedChanged: {\n console.log(connected ? \"new connection!\" : \"connection dropped!\")\n }\n parser: SplitParser {\n onRead: message => console.log(`read message from socket: ${message}`)\n }\n }\n}\n```\n",
"properties": {
"active": {
"type": {
"type": "qt",
"module": "qml",
"name": "bool"
},
"details": "If the socket server is currently active. Defaults to false.\n\nSetting this to false will destory all active connections and delete\nthe socket file on disk.\n\nIf path is empty setting this property will have no effect.\n"
},
"handler": {
"type": {
"type": "qt",
"module": "qml.QtQml",
"name": "Component"
},
"details": "Connection handler component. Must creeate a {{< qmltypelink type=\"local\" module=\"Quickshell.Io\" name=\"Socket\" mtype=\"\" mname=\"\" >}}.\n\nThe created socket should not set {{< qmltypelink type=\"\" module=\"\" name=\"\" mtype=\"prop\" mname=\"connected\" >}} or {{< qmltypelink type=\"\" module=\"\" name=\"\" mtype=\"prop\" mname=\"path\" >}} or the incoming\nsocket connection will be dropped (they will be set by the socket server.)\nSetting `connected` to false on the created socket after connection will\nclose and delete it.\n"
},
"path": {
"type": {
"type": "qt",
"module": "qml",
"name": "string"
},
"details": "The path to create the socket server at.\n\nSetting this property while the server is active will have no effect.\n"
}
},
"functions": [],
"signals": {},
"variants": {}
}