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 » Bug with socket
Re: Bug with socket [message #31572 is a reply to message #31550] Tue, 15 March 2011 10:28 Go to previous messageGo to previous message
nlneilson is currently offline  nlneilson
Messages: 644
Registered: January 2010
Location: U.S. California. Mojave &...
Contributor
Thanks Ion but that would be more complicated than necessary.
It's basically just the code in C:\upp\reference\SocketClient\SocketClient.cpp
which hangs the same with a Win .exe run in Linux with Wine.
String snd(String r, int a){ 
	Socket s;
	if(!ClientSocket(s, "127.0.0.1", 5024)) {
	    return "x";
	}
	if(IO) s.Write(r + "\n");
	if(a==1 && IO){
    	String st = s.ReadUntil('\n');
	    return st;
	}
	return "y";
}

The code where the app hangs is:
if(!ClientSocket(..
when the server socket is not available, has not been opened, has been closed or whatever, it hangs.

Using socket.cpp and socket.h from 3226 or earlier fixes my problem.
I pointed this problem out in case someone else runs into it or if it needs to be fixed.


Neil

[Updated on: Tue, 15 March 2011 11:08]

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
Read Message
Previous Topic: XmlRpc: possible crash fixed
Next Topic: A new function to Web Package Unicode-Escape-Javascript -> Unicode
Goto Forum:
  


Current Time: Sat Jul 05 12:51:58 CEST 2025

Total time taken to generate the page: 0.03519 seconds