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 » non-blocking socket.Write("test string") crash on linux [BUG?]
Re: non-blocking socket.Write("test string") crash on linux [BUG?] [message #11133 is a reply to message #11123] Tue, 21 August 2007 19:42 Go to previous messageGo to previous message
rylek is currently offline  rylek
Messages: 79
Registered: November 2005
Member
Hello!

I've just looked at your P2PSocket example. I haven't yet checked if it really does crash under Linux, but I am not sure how the example is supposed to work. As 'sock' is a ServerSocket, what use is writing anything to it? I have always thought the only use of server sockets is to receive client conversations (via Accept); after Accepting a client socket you can read / write it as necessary, but I believe directly writing / reading a listening socket is a misuse of the socket protocol as such (and quite likely to crash a system which doesn't check the socket state in advance). We could put a flag there to mark the socket state and perhaps ASSERT that the socket being read / written is a ClientSocket or an Accepted socket. Or have I missed something important?

Regards

Tomas
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: using gates but program lags
Next Topic: Mutex locks vs copy constructors
Goto Forum:
  


Current Time: Tue May 14 08:29:39 CEST 2024

Total time taken to generate the page: 0.02733 seconds