コード例 #1
0
        public ServerDispatcher(IServerBusiness business, string ipAddress, int port)
        {
            this.business = business;

            // Can throw if not valid IpAddress
            IPAddress serverIP = IPAddress.Parse(ipAddress);

            // Can throw if invalid port
            EndPoint ep = new IPEndPoint(serverIP, port);

            // Creates the listener socket
            socketListener = new Socket(serverIP.AddressFamily, SocketType.Stream, ProtocolType.Tcp);

            socketListener.Bind(ep);
            socketListener.Listen(100);

            StartListeningForAnotherConnection();
        }
コード例 #2
0
 public ServersController(IServerBusiness serverBusiness)
 {
     _serverBusiness = serverBusiness;
 }
コード例 #3
0
 public ClientBusiness(string rootFolderPath, string serverAddress, int serverPort) : this(rootFolderPath)
 {
     access = new ClientServerAccess(serverAddress, serverPort);
     access.IsAvailable();
 }
コード例 #4
0
 static SitePresenter()
 {
     bl = NinjectDependencyResolver.GetBL <IServerBusiness>();
 }