<commit_before>using ZMQ;

namespace ZMQ {
	/*
	 *  Receive 0MQ uint8 buffer from socket and convert into string.
	 *  Returns null if context is being terminated.
	 */
	public string? s_recv(Socket socket) {
		var msg = Msg ();
		if (socket.recv (ref msg) != 0) {
			return null;
		}

		size_t size = msg.size () + 1;
		uint8[] data = new uint8[size];
		Memory.copy(data, msg.data (), size - 1);
		data[size - 1] = '\0';

		return (string)data;
	}
}<commit_msg>Updated zhelpers to use new Msg.data property.<commit_after>using ZMQ;

namespace ZMQ {
	/*
	 *  Receive 0MQ uint8 buffer from socket and convert into string.
	 *  Returns null if context is being terminated.
	 */
	public string? s_recv(Socket socket) {
		var msg = Msg ();
		if (socket.recv (ref msg) != 0) {
			return null;
		}

		size_t size = msg.size () + 1;
		uint8[] data = new uint8[size];
		Memory.copy(data, msg.data, size - 1);
		data[size - 1] = '\0';

		return (string)data;
	}
}
{'fraction_non_alphanumeric': 0.13836477987421383, 'fraction_numerical': 0.018867924528301886, 'mean_word_length': 2.9791666666666665, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '4855085', 'n_tokens_mistral': 386, 'n_tokens_neox': 334, 'n_words': 110}