01-14-2023, 03:08 AM
Hey all,
This is my first post here. I'm tinkering with QB64 to create a simple server. Listening on port 80 or port 8080 works just fine, but when I try to listen on port 443 it always returns 0 (fail). I've added port access to the Windows firewall and even tried disabling the firewall completely in case I'd done something wrong, but it still fails.
Here's my code. Any ideas? Thanks in advance.
This is my first post here. I'm tinkering with QB64 to create a simple server. Listening on port 80 or port 8080 works just fine, but when I try to listen on port 443 it always returns 0 (fail). I've added port access to the Windows firewall and even tried disabling the firewall completely in case I'd done something wrong, but it still fails.
Here's my code. Any ideas? Thanks in advance.
Code: (Select All)
Dim socketHost As Integer
Dim socketClients(1000) As Integer
Dim clientIndex As Integer
Dim socketClient As Integer
Dim socketData As String
socketHost = _OpenHost("TCP/IP:443")
If socketHost Then
Print "LISTENING @ " + _ConnectionAddress(socketHost)
Do
socketClient = _OpenConnection(socketHost)
If socketClient Then
socketClients(clientIndex) = socketClient
clientIndex = clientIndex + 1
End If
For i = 0 To clientIndex - 1
Get #socketClients(clientIndex), , socketData
Print socketData
Next
Loop
Close #socketHost
Else
Print "Failed to open socket to port 443."
End If