Search found 130 matches

by Opcode
Sat Sep 02, 2023 12:15 am
Forum: Tricks 'n' Tips
Topic: Discord.pbi (only webhooks)
Replies: 10
Views: 4453

Re: Discord.pbi (only webhooks)

I've been having trouble wrapping my head around how to implement other content types. I'd like to be able to upload images like JPG or PNG perhaps even from resources. You can reference what you can submit as part of the json parameters here . It's amazing :!: Thanks a lot to Thorium and also to O...
by Opcode
Sat May 20, 2023 7:40 am
Forum: Feature Requests and Wishlists
Topic: HTTP/2 + websocket
Replies: 12
Views: 4193

Re: HTTP/2 + websocket

+1
by Opcode
Sat Apr 01, 2023 8:03 am
Forum: Bugs - Windows
Topic: [6.01] InsertJSONStructure Debugger Crash
Replies: 0
Views: 178

[6.01] InsertJSONStructure Debugger Crash

When running the following, the debugger just quits unexpectedly without throwing an error ("invalid json value"). Both ASM + C backends. Structure CREATE_MESSAGE content.s nonce.s tts.b Array embeds.s(0) EndStructure jsonBuffer = CreateJSON(#PB_Any) d.CREATE_MESSAGE d\content = "hi&q...
by Opcode
Sat Mar 18, 2023 4:46 am
Forum: Coding Questions
Topic: Choosing between List, Array and Map
Replies: 8
Views: 425

Re: Choosing between List, Array and Map

Map would be best with predefined values since you don't need to waste cycles iterating through an array or list.
by Opcode
Thu Feb 09, 2023 12:08 pm
Forum: Coding Questions
Topic: JSON, Only Include Applied Data
Replies: 2
Views: 343

JSON, Only Include Applied Data

Currently, the JSON functions such as InsertJSONStructure write every field of the structure to the JSON. Structure test a.s b.s c.s d.s EndStructure form.test form\a = "Hello" form\c = "World" If CreateJSON(0) InsertJSONStructure(JSONValue(0), @form, test) Debug ComposeJSON(0, #...
by Opcode
Mon Jan 02, 2023 8:10 am
Forum: Coding Questions
Topic: Check if network port is in use
Replies: 4
Views: 518

Re: Check if network port is in use

GetTcpTable2 may fit the bill for Windows at least. Something I just tossed together (may or may not work properly :lol:): Enumeration #TcpConnectionOffloadStateInHost #TcpConnectionOffloadStateOffloading #TcpConnectionOffloadStateOffloaded #TcpConnectionOffloadStateUploading #TcpConnectionOffloadS...
by Opcode
Sun Jan 01, 2023 10:24 pm
Forum: Coding Questions
Topic: Dynamic variable type?
Replies: 2
Views: 279

Re: Dynamic variable type?

Work not fine with json ... Structure Interaction_Data_Option name.s type.i StructureUnion iVal.i ; OS 32 or 64 Bit lVal.l llVal.q fltVal.f dblVal.d EndStructureUnion sVal.s EndStructure Global var1.Interaction_Data_Option Global var2.Interaction_Data_Option var1\type = #PB_Integer var1\iVal = 1234...
by Opcode
Sun Jan 01, 2023 1:52 pm
Forum: Coding Questions
Topic: Dynamic variable type?
Replies: 2
Views: 279

Dynamic variable type?

My issue is using ExtractJSONStructure to extract JSON data to and array of the same structures for later use. Structure Interaction_Data_Option name.s type.i value EndStructure value can be either integer, double or a string. How could I get value to be able to handle all three data types?
by Opcode
Sat Dec 31, 2022 3:07 am
Forum: Tricks 'n' Tips
Topic: TLS Networking Using LibTLS
Replies: 14
Views: 2861

TLS Networking Using LibTLS

Windows: You will need four files from the LibreSSL package: https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.5.5-windows.zip Note: This is an old (but only) precompiled build of LibreSSL for Windows. If you can, build a newer version! libtls-15.lib libtls-15.dll libssl-43.dll libcrypto-41.d...
by Opcode
Fri Oct 21, 2022 5:24 am
Forum: Tricks 'n' Tips
Topic: Discord.pbi (only webhooks)
Replies: 10
Views: 4453

Re: Discord.pbi (only webhooks)

Updated to utilize the Discord REST API. No longer need libcurl.pbi as this utilizes the inbuilt PureBasic HTTP functions. ;/--------------------------------------------------\ ;| Discord Webhook Code Base | ;| | ;| Date: 10.22.2022 | ;| | ;| PureBasic 6.00 LTS | ;\----------------------------------...
by Opcode
Mon Oct 03, 2022 4:55 am
Forum: Feature Requests and Wishlists
Topic: Implement a full SSL/TLS library
Replies: 65
Views: 9880

Re: Implement a full SSL/TLS library

+1 Built in TLS support with PB network functions would compliment my current project that relies on TLS v1.2.

Code: Select all

OpenNetworkConnection()
CreateNetworkServer()
by Opcode
Tue Apr 05, 2022 11:56 pm
Forum: Game Programming
Topic: speed hack ?
Replies: 6
Views: 2339

Re: speed hack ?

If it's an offline game then there's not much incentive for a player to "cheat" other than solely self amusement. If it's an online/multiplayer game where one is looking for an advantage over another. The best way to is to run checks server side. Never give the client too much control over...
by Opcode
Fri Jul 02, 2021 1:41 am
Forum: Feature Requests and Wishlists
Topic: Support for ARM-Linux
Replies: 121
Views: 48774

Re: Support for ARM-Linux

is iOS not the OS the Apple notebooks work with? I thought they managed to put it together. But anyway - I am not part of the Apple-hype group. iOS is the mobile OS that Apple uses on their iPhones. iPadOS is what they use on their tablets. MacOS is what they use on their laptops to desktops. Suppo...
by Opcode
Fri Feb 21, 2020 9:22 am
Forum: Tricks 'n' Tips
Topic: Windows - Known Folder Paths
Replies: 5
Views: 2250

Re: Windows - Known Folder Paths

More modern approach (according to MSDN). Needs up-to-date Shell32.lib or use OpenLibrary. True. But note that the minimum supported client is Windows Vista (won't work on WinXP). A bit off topic but relevant to your post. Windows XP is officially dead, by both Microsoft and the client ecosystem. W...
by Opcode
Sun Jan 26, 2020 6:19 am
Forum: Feature Requests and Wishlists
Topic: [Windows] API Function RegGetValue_() missing.
Replies: 3
Views: 2457

Re: [Windows] API Function RegGetValue_() missing.

You can always import missing functions if they aren't already supported out of the box. Import "Advapi32.lib" RegGetValueW_(hKey.l, *lpSubKey, *lpValue, dwFlags.l, *pdwType, *pvData, *pcbData) As "_RegGetValueW@28" EndImport Not sure if the parameters are correct... :shock: