2008年06月25日 星期三 22:14
public partial class BankClient
{
private NetworkStream networkStream;
|
2008年06月25日 星期三 22:13
2008年06月25日 星期三 22:12
using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.Data; |
2008年06月25日 星期三 22:08
在网络环境下,我们最感兴趣的两个命名空间是System.Net和 System.Net.Sockets。System.Net命名空间通常与较高程的操作有关,例如download或upload,试用HTTP和其他协议进行Web请求等等,而System.Net.Sockets命名空间所包含的类通常与较低程的操作有关。如果要直接使用Sockets或者 TCP/IP之类的协议,这个命名空间的类是非常有用的。
在.Net中,System.Net.Sockets 命名空间为需要严密控制网络访问的开发人员提供了 Windows Sockets (Winsock) 接口的托管实现。System.Net 命名空间中的所有其他网络访问类都建立在该套接 |
2008年06月25日 星期三 22:07
一个通讯类,类似教程的:
实只要用到Socket联接,基本上就得使用Thread,是交叉使用的。
C#封装的Socket用法基本上不算很复杂,只是不知道托管之后的Socket有没有其他性能或者安全上的问题。
在C#里面能找到的最底层的操作也就是socket了,概念不做解释。
程序模型如下:
WinForm程序 : 启动端口侦听;监视Socket联接情况;定期关闭不活动的联接;
Listener:处理Socket的Accept函数,侦听新链接,建立新Thread来处理这些联接(Connection)。
Connection:处理具体的每一个联接的会话。
|
2008年06月25日 星期三 22:06
using System;
namespace Remotable
{
public class RemotableType : MarshalByRefObject
{
|
2008年06月25日 星期三 22:05
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing; |
2008年06月25日 星期三 22:04
using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.IO;
|
2008年06月25日 星期三 22:03
using System;
using System.Collections.Generic;
using System.Text;
using System.Net.Mail;
using System |
2008年06月25日 星期三 22:02
#region "Download: File transfer FROM ftp server"
/// <summary>
/// |
|
|
lc7cl
男, 23岁
上海
上次登录: 14天前
加为好友
|