Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QB64PE Chat Server
#16
It runs with a small extension: a query as to whether the server should be started.
It bothered me that the server started immediately.  Wink

Code: (Select All)

'Steves Chat Programm - 5. Mai 2024

Option _Explicit
$Color:32
Const Port = "7319", IP = "172.93.60.23"
Const FullPort = "TCP/IP:" + Port
Const FullIP = FullPort + ":" + IP

Dim Shared As Long client 'up to 1000 connections
Dim As String recieved
Dim Shared As String nam
Dim Shared As Long MainDisplay, TextArea, InputArea
Dim Shared As _Float NextPing, server_active
Dim Shared As _Byte TimeStamp 'toggle type display variables
Dim Shared As _Unsigned Long DefaultColor, AudibleAlert

MainDisplay = _NewImage(1280, 720, 32)
TextArea = _NewImage(1280, 600, 32)
InputArea = _NewImage(1280, 120, 32)

DefaultColor = White
TimeStamp = -1
AudibleAlert = -1
Screen MainDisplay

'A query as to whether the server should be started.
Dim As String antwort, yes

Locate 3, 3
Input "Server starten: Yes -- No: ", antwort
If antwort = "yes" Then
  client = _OpenClient(FullIP)
Else
  Locate 5, 3
  Print "Tschuessi!": Sleep 2
  System
End If

Two warnings. I don't understand "Yes" now. - Update: It's clear to me now.

[Image: Chat-Warnung2024-06-05-170059.jpg]
Reply


Messages In This Thread
QB64PE Chat Server - by SMcNeill - 05-29-2024, 03:39 PM
RE: QB64PE Chat Server - by SMcNeill - 05-29-2024, 11:15 PM
RE: QB64PE Chat Server - by PhilOfPerth - 05-29-2024, 11:27 PM
RE: QB64PE Chat Server - by SMcNeill - 05-29-2024, 11:39 PM
RE: QB64PE Chat Server - by SMcNeill - 05-30-2024, 03:08 AM
RE: QB64PE Chat Server - by PhilOfPerth - 05-30-2024, 05:31 AM
RE: QB64PE Chat Server - by SMcNeill - 05-30-2024, 11:08 AM
RE: QB64PE Chat Server - by grymmjack - 05-30-2024, 11:52 AM
RE: QB64PE Chat Server - by Dav - 05-30-2024, 07:35 PM
RE: QB64PE Chat Server - by TerryRitchie - 05-30-2024, 10:30 PM
RE: QB64PE Chat Server - by SMcNeill - 05-30-2024, 10:33 PM
RE: QB64PE Chat Server - by SMcNeill - 05-30-2024, 07:40 PM
RE: QB64PE Chat Server - by PhilOfPerth - 05-30-2024, 11:36 PM
RE: QB64PE Chat Server - by Dav - 06-02-2024, 05:59 PM
RE: QB64PE Chat Server - by SMcNeill - 06-05-2024, 12:08 PM
RE: QB64PE Chat Server - by Kernelpanic - 06-05-2024, 03:02 PM
RE: QB64PE Chat Server - by madscijr - 06-05-2024, 06:45 PM
RE: QB64PE Chat Server - by Dav - 06-06-2024, 12:13 PM
RE: QB64PE Chat Server - by madscijr - 06-06-2024, 01:01 PM
RE: QB64PE Chat Server - by SMcNeill - 06-05-2024, 09:42 PM
RE: QB64PE Chat Server - by madscijr - 06-05-2024, 11:49 PM
RE: QB64PE Chat Server - by SMcNeill - 06-06-2024, 12:41 AM
RE: QB64PE Chat Server - by Kernelpanic - 06-07-2024, 11:40 PM
RE: QB64PE Chat Server - by SMcNeill - 06-08-2024, 12:47 AM
RE: QB64PE Chat Server - by SMcNeill - 06-08-2024, 03:08 PM
RE: QB64PE Chat Server - by Kernelpanic - 06-08-2024, 06:35 PM



Users browsing this thread: 3 Guest(s)