+2005-04-21 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * UnixEndPoint.cs: fix from Mono.Posix.
+
2005-04-20 Jonathan Pryor <jonpryor@vt.edu>
* Syscall.cs: Make all fork(2) and exec(2) functions `private`. It
//
-// Mono.Unix/UnixEndPoint: EndPoint derived class for AF_UNIX family sockets.
+// Mono.Unix.UnixEndPoint: EndPoint derived class for AF_UNIX family sockets.
//
// Authors:
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
{
int size = socketAddress.Size;
byte [] bytes = new byte [size];
- for (int i = 0; i < size; i++) {
+ /*
+ * Should also check this
+ *
+ int addr = (int) AddressFamily.Unix;
+ if (socketAddress [0] != (addr & 0xFF))
+ throw new ArgumentException ("socketAddress is not a unix socket address.");
+
+ if (socketAddress [1] != ((addr & 0xFF00) >> 8))
+ throw new ArgumentException ("socketAddress is not a unix socket address.");
+ */
+
+ for (int i = 2; i < size - 2; i++) {
bytes [i] = socketAddress [i];
}