[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pnet-developers] Wrong list ?
From: |
WC Jones |
Subject: |
[Pnet-developers] Wrong list ? |
Date: |
Mon, 27 Oct 2003 15:28:22 -0500 (EST) |
Is this the wrong list for such things are discussion of using Portable.Net ?
I asked a question about building it earlier -- I am primarily interested in
using C# Portable.Net Networking applications and was using an example I found
to try out some tests - it failed - which is why I posted the first "did I
build it right" question.
This question is directly related to the error:
bash-2.05$ rm *exe ; make -f Makefile.sx_IP ; ilrun sx_IP.exe
"/usr/local/Forsaken/Project/pnetlib/../pnet/csant/csant" --compiler cscc
-Dcscc="/usr/local/Forsaken/Project/pnetlib/../pnet/cscc/cscc"
-Dcscc.plugins.cs="/usr/local/Forsaken/Project/pnetlib/../pnet/cscc/cscc-cs"
--profile "../profiles/full" -f samples.build.sx_IP all
Building project `samples.sx_IP'
Building target `all' for project `samples.sx_IP'
/usr/local/Forsaken/Project/pnetlib/../pnet/cscc/cscc
-fplugin-cs-path=/usr/local/Forsaken/Project/pnetlib/../pnet/cscc/cscc-cs -o
./sx_IP.exe -funsafe
-nostdlib -O2 -DNON_ECMA -DCONFIG_REFLECTION -DCONFIG_RUNTIME_INFRA
-DCONFIG_EXTENDED_NUMERICS -DCONFIG_DEBUG_LINES -DCONFIG_REMOTING
-DCONFIG_SERIALIZATION
-DCONFIG_REFLECTION_EMIT -DCONFIG_COM_INTEROP -DCONFIG_CODEDOM -DCONFIG_CRYPTO
-DCONFIG_X509_CERTIFICATES -DCONFIG_PERMISSIONS -DCONFIG_POLICY_OBJECTS
-DCONFIG_EXTENDED_DIAGNOSTICS -DCONFIG_WIN32_SPECIFICS
-DCONFIG_ISOLATED_STORAGE -DCONFIG_COMPONENT_MODEL
-DCONFIG_COMPONENT_MODEL_DESIGN -DCONFIG_SSL
-Wno-empty-input -flatin1-charset ./sx_IP.cs -L./../System -lSystem
-L./../DotGNU.SSL -lDotGNU.SSL -L./../runtime -lmscorlib
Leaving target `all' for project `samples.sx_IP'
Ending project `samples.sx_IP'
www.google.akadns.net
99.41.239.216
Post DNS Resolution
Uncaught exception: System.Net.Sockets.SocketException: Protocol not supported
at System.Net.Sockets.Socket..ctor(AddressFamily, SocketType,
ProtocolType) in ./Net/Sockets/Socket.cs
at MyClient.Main()
( Even the various examples, sslfetch and httpsrv, give this error. )
The example code I originally tried is mostly as I found it:
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
class MyClient
{
public static void Main()
{
IPHostEntry IPHost = Dns.Resolve("www.google.com");
Console.WriteLine(IPHost.HostName);
string []aliases = IPHost.Aliases;
IPAddress[] addr = IPHost.AddressList;
Console.WriteLine(addr[0]);
EndPoint ep = new IPEndPoint(addr[0],80);
Console.WriteLine("Post DNS Resolution");
Socket sock = new
Socket(AddressFamily.InterNetwork,SocketType.Stream,ProtocolType.Tcp);
Console.WriteLine("Pre socket call");
sock.Connect(ep);
if(sock.Connected)
Console.WriteLine("OK");
Encoding ASCII = Encoding.ASCII;
string Get = "GET / HTTP/1.1\r\nHost: " + "www.
google.com" +
"\r\nConnection: Close\r\n\r\n";
Byte[] ByteGet = ASCII.GetBytes(Get);
Byte[] RecvBytes = new Byte[256];
sock.Send(ByteGet, ByteGet.Length, 0);
Int32 bytes = sock.Receive(RecvBytes, RecvBytes.Length,
0);
Console.WriteLine("Post socket call");
Console.WriteLine(bytes);
String strRetPage = null;
strRetPage = strRetPage + ASCII.GetString(RecvBytes, 0,
bytes);
while (bytes > 0)
{
bytes = sock.Receive(RecvBytes,
RecvBytes.Length, 0);
strRetPage = strRetPage +
ASCII.GetString(RecvBytes, 0, bytes);
Console.WriteLine(strRetPage);
}
// commented out by -Sx-
// sock.ShutDown(SocketShutdown.Both);
sock.Close();
}
}
Any insight (or a simple you're on the wrong list) would be most welcome at
this point :)
Thx/Bill
_Sx____________________
('> iudicium ferat
//\ Have Computer -
v_/_ Will Hack...
\|/ ____ \|/
"@'/ .. \`@"
/_| \__/ |_\
\__U_/
- [Pnet-developers] Wrong list ?,
WC Jones <=