LordoToasty
LordoToasty
CC#
Created by LordoToasty on 5/26/2024 in #help
System.ArgumentOutOfRangeException: Pls Help :.)
"currentcase |= BoolToByte(pre64_bits[(i * 6) + j]);" It's this line that causes the problem and I know what OutOfRangeException in general means, but I don't get where my math sucked hard enough to throw that exception.
6 replies
CC#
Created by LordoToasty on 5/26/2024 in #help
System.ArgumentOutOfRangeException: Pls Help :.)
I just set a breakpoint and then click F11 (singlestep)
6 replies
CC#
Created by LordoToasty on 12/21/2023 in #help
PCP request to router (port forwarding) problem.
does this look right?
5 replies
CC#
Created by LordoToasty on 12/21/2023 in #help
PCP request to router (port forwarding) problem.
// Receive the response packet from the PCP server byte[] responsePacket = new byte[128]; int bytesReceived = socket.ReceiveFrom(responsePacket, responsePacket.Length, SocketFlags.None, ref serverAddress, ref serverPort); // Parse the response packet int lifetime = responsePacket[4]; // Lifetime in seconds int protocol = responsePacket[8]; // Protocol int internalPort = responsePacket[12]; // Internal port byte[] assignedExternalPort = new byte[2]; Array.Copy(responsePacket, 14, assignedExternalPort, 0, 2); // Assigned external port (2 bytes) byte[] assignedExternalIPAddress = new byte[16]; Array.Copy(responsePacket, 16, assignedExternalIPAddress, 0, 16); // Assigned external IP address (16 bytes)
5 replies
CC#
Created by LordoToasty on 12/21/2023 in #help
PCP request to router (port forwarding) problem.
// Create a socket for UDP communication with the PCP server Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); // Set the PCP server address and port IPAddress serverAddress = IPAddress.Parse("192.168.1.100"); int serverPort = 65536; // PCP port // Create a request packet byte[] requestPacket = new byte[128]; // Set the request opcode requestPacket[0] = 0x06; // MAP opcode // Set the requested lifetime in seconds requestPacket[4] = 0; // 0 seconds (delete) // Set the protocol requestPacket[8] = 17; // TCP protocol // Set the internal port requestPacket[12] = 0; // All ports // Set the suggested external port requestPacket[14] = 0; socket.SendTo(requestPacket, requestPacket.Length, SocketFlags.None, serverAddress, serverPort);
5 replies
CC#
Created by LordoToasty on 12/12/2023 in #help
CS0122, just with a partial class...
it worked! 😅 Thank you both a lot, now I get it... ps: you got a dope profile picture anugis... (Love that anime)
18 replies
CC#
Created by LordoToasty on 12/12/2023 in #help
CS0122, just with a partial class...
yes yes ouu, I see it is private(its tagetport)
18 replies
CC#
Created by LordoToasty on 12/12/2023 in #help
CS0122, just with a partial class...
18 replies
CC#
Created by LordoToasty on 12/12/2023 in #help
CS0122, just with a partial class...
not really, more like: public partial class A { int a = x } public class B { Console.Writeline(A.a) }
18 replies
CC#
Created by LordoToasty on 12/12/2023 in #help
CS0122, just with a partial class...
I see, so what could be the problem then, shoul I send in the code?
18 replies
CC#
Created by LordoToasty on 12/10/2023 in #help
Timer, devideFound and Background Thread!
Update: So if you care...it turned out that Device Lost is automatically called whenever the Port-Mapping expires, this way I've just put in the same line of code to create a portmat. The result is quite obvious considering this loop works (it does indeed work).
29 replies
CC#
Created by LordoToasty on 12/10/2023 in #help
Timer, devideFound and Background Thread!
I see,... thx.
29 replies
CC#
Created by LordoToasty on 12/10/2023 in #help
Timer, devideFound and Background Thread!
yes yes
29 replies
CC#
Created by LordoToasty on 12/10/2023 in #help
Timer, devideFound and Background Thread!
allright, thanks for helping me out so faar anyways, I'm gonna try doing a structur-diagram first and building arround it then I guess.
29 replies
CC#
Created by LordoToasty on 12/10/2023 in #help
Timer, devideFound and Background Thread!
Here is the code, which the log originates from:
29 replies
CC#
Created by LordoToasty on 12/10/2023 in #help
Timer, devideFound and Background Thread!
All of the threads, which go one after another are the timer, tho does this mean it got really executed? I don't see the "Protocol: ", or is this kind of behavior normal?
29 replies
CC#
Created by LordoToasty on 12/10/2023 in #help
Timer, devideFound and Background Thread!
umm..Here is the log after 20 min right after the "ServerProgram()":
29 replies
CC#
Created by LordoToasty on 12/10/2023 in #help
Timer, devideFound and Background Thread!
...as I have set a new timer, waited for a good 10min after and the port-forwarding was executed just once.
29 replies
CC#
Created by LordoToasty on 12/10/2023 in #help
Timer, devideFound and Background Thread!
I've a question to ask: won't the last thread(starting run.bat [not initializing it]), stop all parallel threads of the app, as the server stays open/running (in a separate window) and my assumption is: cus of the process still running. ...?
29 replies
CC#
Created by LordoToasty on 12/10/2023 in #help
Timer, devideFound and Background Thread!
hmm I see.
29 replies