Asher
Asher
CC#
Created by Asher on 12/18/2023 in #help
Unable to cancel async operation using CancellationToken
Hey all, I have a piece of code which attempts to cancel a UDP Recieve call after 5 seconds
5 replies
CC#
Created by Asher on 11/11/2023 in #help
UdpClient doesn't receive data with ReceiveAsync but does with BeginReceive
Hello all, I'm making a torrent client and I'm facing a problem
14 replies
CC#
Created by Asher on 9/23/2023 in #help
❔ Constructing big endian byte message from multiple integers
Hey all, I'm following the torrent protocol trying to create messages for the protocol to give trackers; I'm not getting a response back and I'm not 100% sure what I got wrong, here is some sample code and the protocol itself:
6 replies
CC#
Created by Asher on 9/20/2023 in #help
❔ Retrieving message from a UDP socket
Heyo I'm following some guide thats using js, I need to find the C# equivalent
20 replies
CC#
Created by Asher on 9/13/2023 in #help
❔ Format parsing problem with character collision
Hi everyone, assume I have the following bencode listl4:spam5:helloe (where the last e signifies the end of the list) Apart from reading each element until there is an e which would create code duplication for me, is there any way to easily identify the difference between an e inside of a string and an e as the end of the list object? (or other objects such as integers for that matter)
65 replies
CC#
Created by Asher on 12/29/2022 in #help
❔ Using Event Handler null exception
Definition (in EventHandlerClass) public EventHandler<ActionMessage> OnAction; Usage: EventHandlerClass.OnAction += ActionUsage; this gives me a null exception on the Usage line, is there something I'm doing wrong here? (this is before invoking, or doing anything else, however, I do think it has something to do with OnAction not being initialized, but I couldn't find any examples where it is initialized. The handler signature and event args match. Is this correct usage? or do I have something else wrong with my code?
29 replies
CC#
Created by Asher on 12/20/2022 in #help
✅ Check if port is up
Hey all, I have a process which is running a server on a certain port _port locally, the clients are also connecting on 127.0.0.1, so everything is local. I need a way for the server to tell the clients when to actually connect / if its up, originally I wanted to do a filesystem approach where I create an open.txt file, but that also proved to be bad as the file was always used when clients were originally checking if to connect or not
6 replies
CC#
Created by Asher on 11/29/2022 in #help
❔ Multiple Processes communication
hey all, I want to have a few processes communicate between them, my ideas so far is a socket server that would transmit the messages between them but I would rather something that would be direct, anyone know any libraries that help with this?
5 replies