|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;
using System.Net;
namespace GolabiProxyServer
{
class ProxyTCPListener
{
private TcpListener _Listener;
private ConnectionInfo _Info;
public ProxyTCPListener(ConnectionInfo info)
{
this._Info = info;
this._Listener = new TcpListener(this._Info.LocalIP, this._Info.LocalPort);
}
public void StartServer(GolabiServerUI messageCenter, string key)
{
this._Listener.Start();
}
public void AcceptConnection()
{
if (this._Listener.Pending())
{
Socket newClient = this._Listener.AcceptSocket();
this._Info.MessageCenter.setMessage("ClientAccepted...");
ClientConnection client = new ClientConnection(newClient, this._Info);
client.StartHandling();
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Bachelor of computer software engineer at Urmia University of Technology,
Masters of computer software engineer at Shahid Beheshti University,
Microsoft Certified Solution Developer : Web Applications,
Microsoft Specialist : HTML5 , CSS3 , javascript,
MCTS at Mojtame Fanni Tehran (MFT)
My Server Solution Blog