Boop
Boop
Explore posts from servers
DIAdiscord.js - Imagine an app
Created by Boop on 9/2/2023 in #djs-questions
Issues with two collectors
No description
5 replies
CC#
Created by Boop on 9/25/2022 in #help
MessagePack erroring
client sending data
var sendData = new SocketSendData(new InitialConnectionData(Helpers.GetPCDisplayName(),
Helpers.GetIPAddress(), Helpers.GetOSVersion()));
var buf = MessagePackSerializer.Serialize(sendData);
ClientSocket.Send(buf, 0, buf.Length, SocketFlags.None);
var sendData = new SocketSendData(new InitialConnectionData(Helpers.GetPCDisplayName(),
Helpers.GetIPAddress(), Helpers.GetOSVersion()));
var buf = MessagePackSerializer.Serialize(sendData);
ClientSocket.Send(buf, 0, buf.Length, SocketFlags.None);
class
[MessagePackObject]
public class InitialConnectionData
{
[SerializationConstructor]
public InitialConnectionData(string pcName, string dnsIpAddr, string osVersion)
{
PCName = pcName;
DnsIpAddr = dnsIpAddr;
OSVersion = osVersion;
}

[Key(0)] public string PCName { get; set; }

[Key(1)] public string MachineIPAddr { get; set; }

[IgnoreMember] public string DnsIpAddr { get; set; }

[IgnoreMember] public Socket LinkedSocket { get; set; }

[Key(3)] public string OSVersion { get; set; }
[MessagePackObject]
public class InitialConnectionData
{
[SerializationConstructor]
public InitialConnectionData(string pcName, string dnsIpAddr, string osVersion)
{
PCName = pcName;
DnsIpAddr = dnsIpAddr;
OSVersion = osVersion;
}

[Key(0)] public string PCName { get; set; }

[Key(1)] public string MachineIPAddr { get; set; }

[IgnoreMember] public string DnsIpAddr { get; set; }

[IgnoreMember] public Socket LinkedSocket { get; set; }

[Key(3)] public string OSVersion { get; set; }
Having an issue with messagepack. Getting a Sequence contains more than one matching element error
32 replies
CC#
Created by Boop on 9/24/2022 in #help
Socket Identification Help & Sending Bitmaps
private static void SendScreen()
{
MemoryStream ms = new MemoryStream();
ms.Write(Encoding.ASCII.GetBytes("screen:"), 0, Encoding.ASCII.GetBytes("EOF").Length);
Helpers.GetScreen().Save(ms, System.Drawing.Imaging.ImageFormat.Bmp);
var imageData = ms.ToArray();
var lengthData = BitConverter.GetBytes(imageData.Length);
ClientSocket.Send(imageData, 0, imageData.Length, SocketFlags.None);
}
private static void SendScreen()
{
MemoryStream ms = new MemoryStream();
ms.Write(Encoding.ASCII.GetBytes("screen:"), 0, Encoding.ASCII.GetBytes("EOF").Length);
Helpers.GetScreen().Save(ms, System.Drawing.Imaging.ImageFormat.Bmp);
var imageData = ms.ToArray();
var lengthData = BitConverter.GetBytes(imageData.Length);
ClientSocket.Send(imageData, 0, imageData.Length, SocketFlags.None);
}
This is my void to send a bitmap of the screen but I do not know how to do packet identification with sending an image & how to do it with integers instead of strings
30 replies
CC#
Created by Boop on 8/22/2022 in #help
NullReferenceException Object reference not set to an instance of an object
List<Effects> effectsList = activePlayerEffects[targetPlayer] ?? new List<Effects>();
List<Effects> effectsList = activePlayerEffects[targetPlayer] ?? new List<Effects>();
someone save me!
4 replies