Improve Participant creation
To create the only implemented connection type by sockets, the BusClientConnection class uses the TcpClient class provided by .Net. By creating an instance with string, a dns service will be invoked to resolve an ip adress. This one seems to be really slow (really really slow, like 1-2 seconds). Thus the creation of a TcpClient is changed to directly using a byte array of size 4.
The caveat is, that only IPv4 adresses can be used now. The advantage is a fast participant creation.
This one will be further improved later, but a faster connection establishment now is really helpful.
Improve tcp connection establishment
Force IPv4 connections.
Somehow the .Net class TcpClient tries IPv6 until timeout using the
previous constructor initialization.
Signed-off-by: Johannes Wienke <email@example.com>
#3 Updated by S. Barut over 1 year ago
The Connection will be established through an IPEndPoint object, which can be created outside, thus the user can use the same dns resolution for all connection instances.
For easier use, the user can still just give the ip address as byte array.
#7 Updated by S. Barut over 1 year ago
I checked, it is not the system.
But i finally found a reason:
Funny, so actually the fix was a bit easier :)
But still, wouldn't it make more sense, if the host is just resolved one time and not in every participant creation?
#10 Updated by S. Barut over 1 year ago
Well, more or less reverted everything but outsourced the connection of the TcpClient from the constructor (see SO-hyperlink)