History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: COR-709
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Unassigned
Reporter: Richard Liang
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
db4o Core

Sharpen.Net.Socket.Socket(string hostName, int port) throws "SocketException" when hostname is localhost

Created: 06/Jul/07 12:23 PM   Updated: 22/Aug/07 07:46 PM
Component/s: Client/Server
Affects Version/s: None
Fix Version/s: Denmark - v6.3

Time Tracking:
Original Estimate: Not Specified
Remaining Estimate: 0h
Time Spent - 3h
Time Spent: 3h
Time Spent - 3h

Order: 3
Resolution Date: 22/Aug/07 07:46 PM
First Response Date: 29/Jul/07 09:13 PM
Labels:
Participants: Norberto Goussies and Richard Liang
Number of Attachments: 0
Number of Comments: 2


 Description  « Hide
Hello,

Sharpen.Net.Socket.Socket(string hostName, int port) throws "SocketException: An address incompatible with the requested protocol was used" in Pocket PC Emulator (CF2.0) when hostname is localhost

The problem is that "localhost" is resolved as two IP adress, that is
Dns.Resolve("localhost").AddressList[0]="::1", (AddressFamily = InterNetworkV6)
Dns.Resolve("localhost").AddressList[0]="127.0.0.1", (AddressFamily=InterNetwork)

....
public class Socket : SocketWrapper
{
InputStream _in;
OutputStream _out;

public Socket(string hostName, int port)
{
NativeSocket socket = new NativeSocket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
socket.Connect(new IPEndPoint(Dns.Resolve(hostName).AddressList[0], port));
Initialize(socket);
}
....

Best regards,
Richard

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Norberto Goussies - 29/Jul/07 09:13 PM
this issue seems to be still present in 6.1 branch.
it is reproducible running Db4objects.Db4o.Tests.Common.Assorted.AliasesTestCase.

Richard Liang - 14/Aug/07 07:33 AM
Fixed at revision 7304