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 #31606 is a reply to message #31572] Thu, 17 March 2011 09:21 Go to previous messageGo to previous message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

nlneilson wrote on Tue, 15 March 2011 11:28

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

can you test "ZMQ_HelloeWorld_Srv" and "ZMQ_HelloWorld_Clnt" from bazaar?
I tried to test "ZMQ_HelloWorld_Clnt" with "SocketServer" but it seems to be incompatible.
 
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: Tue Aug 26 04:41:38 CEST 2025

Total time taken to generate the page: 0.00659 seconds