匿名Socket服务器和客户端程序

收录时间:2014-03-06
资源分类:C#

该C#程序实现了匿名套接字,并实现以下功能:

1. 匿名处理

2. 加密解密

3. 封装socket。

 

An Asynchronous Socket Server and Client

I've been working with sockets since 2000, using Delphi 5.0 and some third-party libraries (Synapse). My very first socket application just copied files between many clients and one server. The client app checks a folder to see if files exist, asks the server where to copy the files in the network and, after copying the files, flags the database record indicating that a file has been moved. The server listens to the client connections, and both exchange XML messages indicating the state of each file copy. Synapse is a blocking socket implementation, and I needed a thread pooling mechanism that works like an HTTP server, because I couldn't keep the connection open (one thread per connection). My solution was to use some IOCP functions to pool the client requests (code) and close the connection after the message exchange was terminated.

 

Now, using C#, I decided to write a socket server and client library that helps me to only have to think about the message exchange (the process) and let .NET do the hard job. So, I needed the following features:

 

Asynchronous processing

Some encryption and compression capabilities

Encapsulate the socket, and encrypt the services in the interfaces and separate them from the host implementation

文件下载列表
附件内容(只显示109中的10个)
ChatServiceServer.cs  ChatServiceServer.Designer.cs  ChatServiceServerInstaller.cs  ChatServiceServerInstaller.Designer.cs  ChatSocketService.cs  ChatCryptService.cs  Main.cs  AssemblyInfo.cs  Program.cs  frmClient.Designer.cs  
标签: Socket 
更多

目前尚无评论

用户反馈   关于我们
Copyright (©) ZHIHUISHI.COM 2013 All Rights Reserved.
京ICP备12012558号-7