Forum > Networking and Web Programming

How to do Warfley simple websocket server sample on a form not in console

(1/3) > >>

Mongkey:
Anyone know how to do this? as i know got sample only on console mode.
1. got freezing on server start.
2. how to do registering handler on visual form

Thank you

KodeZwerg:
What is "Warfley simple websocket server sample" ?

PierceNg:

--- Quote from: Mongkey on February 14, 2023, 01:26:22 am ---1. got freezing on server start.

--- End quote ---

Start the server in its own thread, not in the main GUI thread.


--- Quote from: Mongkey on February 14, 2023, 01:26:22 am ---2. how to do registering handler on visual form

--- End quote ---

Don't understand the question. You mean like having a text label on a form and updating the label with data that the socket server receives? For that PostMessage / SendMessage could do the job, or you may need to implement producer/consumer queues with synchronized multithreaded access by GUI and socket server.

Mongkey:

--- Quote from: KodeZwerg on February 14, 2023, 01:54:47 am ---What is "Warfley simple websocket server sample" ?

--- End quote ---

Simple hello world on a controlled form ws server. Thank you.

Mongkey:

--- Quote from: PierceNg on February 14, 2023, 04:11:58 am ---
--- Quote from: Mongkey on February 14, 2023, 01:26:22 am ---1. got freezing on server start.

--- End quote ---

Start the server in its own thread, not in the main GUI thread.


--- Quote from: Mongkey on February 14, 2023, 01:26:22 am ---2. how to do registering handler on visual form

--- End quote ---

Don't understand the question. You mean like having a text label on a form and updating the label with data that the socket server receives? For that PostMessage / SendMessage could do the job, or you may need to implement producer/consumer queues with synchronized multithreaded access by GUI and socket server.

--- End quote ---

Yes, my friend , simple mean may only has 1-5 wsclients. Sendmessages Only to display counter. Thank you.

Navigation

[0] Message Index

[#] Next page

Go to full version