Home » U++ Library support » U++ MT-multithreading and servers » [SOLVED] TcpSocket Connect error
Re: TcpSocket Connect error [message #42424 is a reply to message #42396] |
Thu, 13 March 2014 08:28   |
|
I used the WaitWrite in the Connect2 function in my example, but checking errno just after the WaitWrite returns, it still shows 115 (EINPROGRESS).
It only works if I call getsockopt afterwards, then optval is set to 111 (Connection refused).
I have improved the logging in my example, so now the output is like this:
Quote: | Test1 Connecting
After Connect: 115 Operation now in progress
Connected
Sending: My Test String
ERROR: 111 Connection refused
Test2 Connecting
After WaitWrite: 115 Operation now in progress
optval: 111 Connection refused
SUCCESS: No Connection to non existing server.
|
Test1 is getting the error after the first write attempt, but it should have failed on connect.
Test2 calls getsockopt and detects the missing connection correctly.
|
|
|
 |
|
[SOLVED] TcpSocket Connect error
By: steffen on Tue, 11 March 2014 12:35
|
 |
|
Re: TcpSocket Connect error
By: mirek on Wed, 12 March 2014 10:52
|
 |
|
Re: TcpSocket Connect error
By: steffen on Wed, 12 March 2014 17:24
|
 |
|
Re: TcpSocket Connect error
By: mirek on Wed, 12 March 2014 19:07
|
 |
|
Re: TcpSocket Connect error
By: steffen on Thu, 13 March 2014 08:28
|
 |
|
Re: TcpSocket Connect error
By: steffen on Thu, 13 March 2014 08:43
|
 |
|
Re: TcpSocket Connect error
By: mirek on Sun, 23 March 2014 17:16
|
 |
|
Re: TcpSocket Connect error
By: steffen on Mon, 24 March 2014 08:22
|
 |
|
Re: TcpSocket Connect error
By: mirek on Mon, 24 March 2014 10:21
|
 |
|
Re: TcpSocket Connect error
By: steffen on Mon, 24 March 2014 12:02
|
 |
|
Re: TcpSocket Connect error
By: mirek on Tue, 01 April 2014 19:51
|
 |
|
Re: TcpSocket Connect error
By: steffen on Wed, 02 April 2014 07:02
|
Goto Forum:
Current Time: Tue Apr 29 23:36:14 CEST 2025
Total time taken to generate the page: 0.01009 seconds
|