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: 5576

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 ...
by Opcode
Sat May 20, 2023 7:40 am
Forum: Feature Requests and Wishlists
Topic: HTTP/2 + websocket
Replies: 17
Views: 7317

Re: HTTP/2 + websocket

+1
by Opcode
Sat Mar 18, 2023 4:46 am
Forum: Coding Questions
Topic: Choosing between List, Array and Map
Replies: 8
Views: 896

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: 657

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, #PB_JSON ...
by Opcode
Mon Jan 02, 2023 8:10 am
Forum: Coding Questions
Topic: Check if network port is in use
Replies: 4
Views: 924

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 ...
by Opcode
Sun Jan 01, 2023 10:24 pm
Forum: Coding Questions
Topic: Dynamic variable type?
Replies: 2
Views: 556

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 ...
by Opcode
Sun Jan 01, 2023 1:52 pm
Forum: Coding Questions
Topic: Dynamic variable type?
Replies: 2
Views: 556

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: 5074

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 ...
by Opcode
Fri Oct 21, 2022 5:24 am
Forum: Tricks 'n' Tips
Topic: Discord.pbi (only webhooks)
Replies: 10
Views: 5576

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: 77
Views: 31040

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: 2967

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 the game ...
by Opcode
Fri Jul 02, 2021 1:41 am
Forum: Feature Requests and Wishlists
Topic: Support for ARM-Linux
Replies: 121
Views: 59353

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 ...
by Opcode
Fri Feb 21, 2020 9:22 am
Forum: Tricks 'n' Tips
Topic: Windows - Known Folder Paths
Replies: 5
Views: 2791

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 ...
by Opcode
Sun Jan 26, 2020 6:19 am
Forum: Feature Requests and Wishlists
Topic: [Windows] API Function RegGetValue_() missing.
Replies: 3
Views: 2848

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: