<commit_before>
import QtQuick 2.0
import QtQuick.Controls 1.1

import org.jemc.qml.Sockets 1.0

Rectangle {
    width: 300; height: 200
    color: "black"
    
    // UDPMulticastSocket {
        // group: "172.16.58.3"
        // port: 9131
    TCPSocket {
        host: "localhost"
        port: 4998
        
        id: socket
        
        property var latest: ""
        
        onRead: {
            console.log("READ:  %1".arg(message))
            latest = message
        }
        
        onConnected:
            console.log("CONNECTED")
        
        onDisconnected:
            console.log("DISCONNECTED")
        
        Component.onCompleted: 
            connect()
    }
    
    Column {
        Text { font.pointSize:20; color:"yellow"; text:socket.group }
        Text { font.pointSize:20; color:"yellow"; text:socket.port }
        Text { font.pointSize:20; color:"yellow"; text:socket.state }
        Text { font.pointSize:20; color:"yellow"; text:socket.latest }
        Button { text: "Connect";    onClicked: socket.connect() }
        Button { text: "Disconnect"; onClicked: socket.disconnect() }
        Button { text: "Write";      onClicked: socket.write("LOOK AT ME") }
    }
    
}<commit_msg>More play with UDPMulticastSocket in app.qml<commit_after>
import QtQuick 2.0
import QtQuick.Controls 1.1

import org.jemc.qml.Sockets 1.0

Rectangle {
  width: 800; height: 1000
  color: "black"
  
  UDPMulticastSocket {
    group: "172.16.58.3"
    port: 9131
  // TCPSocket {
  //     host: "localhost"
  //     port: 4998
    
    id: socket
    
    onRead: listModel.insert(0, {"type": message})
    
    Component.onCompleted: connect()
  }
  
  ListModel{ id: listModel }
  
  Row {
    height: parent.height
    Column {
      width: 600
      height: parent.height
      Text { font.pointSize:20; color:"yellow"; text:socket.group }
      Text { font.pointSize:20; color:"yellow"; text:socket.port }
      Text { font.pointSize:20; color:"yellow"; text:socket.state }
      Text { font.pointSize:20; color:"yellow"; text:socket.latest }
      Button { text: "Connect";    onClicked: socket.connect() }
      Button { text: "Disconnect"; onClicked: socket.disconnect() }
      Button { text: "Write";      onClicked: socket.write("LOOK AT ME") }
    }
    
    Column {
      width: 50
      height: parent.height
      ListView {
        anchors.fill: parent
        model: listModel
        delegate: Rectangle {
          height: 40
          width: 600
          color: "purple"
          Text { font.pointSize:20; color:"white"; text:model.type }
        }
      }
    }
  }
  
}
{'fraction_non_alphanumeric': 0.12219261515036163, 'fraction_numerical': 0.03311762466692044, 'mean_word_length': 1.9661399548532732, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1800742', 'n_tokens_mistral': 890, 'n_tokens_neox': 830, 'n_words': 183}