[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/samples sslfetch.cs,1.2,1.3
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/samples sslfetch.cs,1.2,1.3 |
Date: |
Fri, 30 May 2003 23:32:04 -0400 |
Update of /cvsroot/dotgnu-pnet/pnetlib/samples
In directory subversions:/tmp/cvs-serv32646/samples
Modified Files:
sslfetch.cs
Log Message:
Add the CONFIG_SMALL_CONSOLE profile option, which strips
System.Console down to a smaller size.
Index: sslfetch.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/samples/sslfetch.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** sslfetch.cs 27 May 2003 12:44:22 -0000 1.2
--- sslfetch.cs 31 May 2003 03:32:02 -0000 1.3
***************
*** 46,50 ****
--- 46,54 ----
if(args.Length != 1)
{
+ #if CONFIG_SMALL_CONSOLE
+ Console.WriteLine("Usage: sslfetch
url");
+ #else
Console.Error.WriteLine("Usage:
sslfetch url");
+ #endif
return 1;
}
***************
*** 52,56 ****
--- 56,64 ----
if(uri.Scheme != "https")
{
+ #if CONFIG_SMALL_CONSOLE
+ Console.WriteLine("{0} is not a https
url", args[0]);
+ #else
Console.Error.WriteLine("{0} is not a
https url", args[0]);
+ #endif
return 1;
}
***************
*** 61,65 ****
--- 69,77 ----
// Connect to the remote server.
+ #if CONFIG_SMALL_CONSOLE
+ Console.WriteLine("Connecting to {0} ...",
ep.ToString());
+ #else
Console.Error.WriteLine("Connecting to {0}
...", ep.ToString());
+ #endif
Socket socket = new
Socket(AddressFamily.InterNetwork,
SocketType.Stream,
***************
*** 74,82 ****
--- 86,102 ----
// Perform the SSL handshake and get the stream.
+ #if CONFIG_SMALL_CONSOLE
+ Console.WriteLine("Performing the SSL handshake
...");
+ #else
Console.Error.WriteLine("Performing the SSL
handshake ...");
+ #endif
Stream stream =
session.PerformHandshake(socket);
// Write the HTTP "GET" to the server.
+ #if CONFIG_SMALL_CONSOLE
+ Console.WriteLine("Sending HTTP request ...");
+ #else
Console.Error.WriteLine("Sending HTTP request
...");
+ #endif
String get = "GET " + uri.LocalPath + "
HTTP/1.0\r\n";
get += "\r\n";
***************
*** 96,105 ****
--- 116,133 ----
// Close the secure stream.
+ #if CONFIG_SMALL_CONSOLE
+ Console.WriteLine("Closing the secure session
...");
+ #else
Console.Error.WriteLine("Closing the secure
session ...");
+ #endif
stream.Close();
session.Dispose();
// Close the socket.
+ #if CONFIG_SMALL_CONSOLE
+ Console.WriteLine("Closing the underlying
socket ...");
+ #else
Console.Error.WriteLine("Closing the underlying
socket ...");
+ #endif
socket.Close();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/samples sslfetch.cs,1.2,1.3,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnetlib ChangeLog,1.959,1.960
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnetlib/JScript/Vsa ScriptStream.cs,1.1,1.2 VsaEngine.cs,1.3,1.4
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnetlib ChangeLog,1.959,1.960
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnetlib/JScript/Vsa ScriptStream.cs,1.1,1.2 VsaEngine.cs,1.3,1.4
- Index(es):