SocketPermission that allows the code to open a TCP connection to the specified host and port : SocketPermission « Network « C# / CSharp Tutorial






using System;
using System.Net;
using System.Security.Permissions;

[assembly:SocketPermission(SecurityAction.RequestMinimum, Access = "Connect", Host = "www.java2s.com", Port = "9999", Transport = "Tcp")]
class MainClass
{
    public static void Main()
    {        
    }
}








33.30.SocketPermission
33.30.1.Minimum permission request for SocketPermission
33.30.2.SocketPermission that allows the code to open a TCP connection to the specified host and port