Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ MT-multithreading and servers » How to create sockets that don't block the GUI?
Re: How to create sockets that don't block the GUI? [message #38441 is a reply to message #38241] Sat, 15 December 2012 18:40 Go to previous messageGo to previous message
nlneilson is currently offline  nlneilson
Messages: 644
Registered: January 2010
Location: U.S. California. Mojave &...
Contributor
What is being sent through a socket is a bunch of character ending with \0.

After it is received it can be parsed into separate lines with \n

Do all of the addition of characters before passing the data to the client to be sent and on the server just pass the whole buffer out to be parsed.

For small amounts of data it can be added and parsed in the client and server.

The \n or \r are just like any other character as far as what is in the buffer or packet sent. If the actual packet size limit is 65536 then there could be many \n or whatever.
The only character that has real significance is \0 which indicates the END of the packet.

Parse what is in the packet outside the server code unless the amount of data is small.

[Updated on: Sat, 15 December 2012 18:50]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: WebSockets non blocking mode?
Next Topic: SKYLARK js: I offer that we expanded the UxGet function a little with parameter callback
Goto Forum:
  


Current Time: Mon Aug 25 03:50:33 CEST 2025

Total time taken to generate the page: 0.06485 seconds