Csharp/CSharp Tutorial/Network/SocketPermission — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Версия 15:31, 26 мая 2010
Minimum permission request for SocketPermission
using System;
using System.Net;
using System.Security.Permissions;
[assembly: SocketPermission(SecurityAction.RequestMinimum, Unrestricted = true)]
class MainClass
{
public static void Main()
{
}
}
SocketPermission that allows the code to open a TCP connection to the specified host and port
using System;
using System.Net;
using System.Security.Permissions;
[assembly:SocketPermission(SecurityAction.RequestMinimum, Access = "Connect", Host = "www.nfex.ru", Port = "9999", Transport = "Tcp")]
class MainClass
{
public static void Main()
{
}
}