Client.cs
资源名称:Visual.rar [点击查看]
上传用户:yiyuerguo
上传日期:2014-09-27
资源大小:3781k
文件大小:1k
源码类别:
C#编程
开发平台:
Others
- using System;
- using System.Threading;
- namespace ChatServer
- {
- using System.Net.Sockets;
- using System.Net;
- /// <summary>
- /// Client 的摘要说明。
- /// </summary>
- public class Client
- {
- private Thread clthread;
- private EndPoint endpoint;
- private string name;
- private Socket sock;
- public Client(string _name, EndPoint _endpoint, Thread _thread, Socket _sock)
- {
- // TODO: 在此处添加构造函数逻辑
- clthread = _thread;
- endpoint = _endpoint;
- name = _name;
- sock = _sock;
- }
- public override string ToString()
- {
- return endpoint.ToString()+ " : " + name;
- }
- public Thread CLThread
- {
- get{return clthread;}
- set{clthread = value;}
- }
- public EndPoint Host
- {
- get{return endpoint;}
- set{endpoint = value;}
- }
- public string Name
- {
- get{return name;}
- set{name = value;}
- }
- public Socket Sock
- {
- get{return sock;}
- set{sock = value;}
- }
- }
- }