Asher
❔ 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
❔ Format parsing problem with character collision
Hi everyone, assume I have the following bencode list
l4: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
❔ 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
✅ 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 not6 replies