Description: 利用同步异步套接字及tcplistener监听rs232,tcp,udp等类型端口数据并实现协议解码-use of synchronous and asynchronous socket tcplistener eavesdropping RS232, tcp, udp port types, such as data and achieve agreement Decoders Platform: |
Size: 32768 |
Author:高洪涛 |
Hits:
Description: 没有使用Tcplistener, TcpClient等已经被封装好了的类, 全部采用Socket开发, 位的是让读者对socket原理更胜了解-Do not use Tcplistener, TcpClient and so has been a good package of the category, all use Socket development, bit socket is to allow readers to understand the principle is far better than Platform: |
Size: 38912 |
Author:王小九 |
Hits:
Description: 当看到.NET中TcpListener和TcpClient的时候,我非常高兴,那就是我想要的通讯模式
但是使用之后发现它们的力量太单薄了,我们需要一个更好的类库来替代它们.
下面提供了一些类,可以很好的完成Tcp的C/S通讯模式.在本文的第二部分,我将为大家介绍怎么使用它们-When he saw. NET in TcpListener and TcpClient time, I am very pleased that I want to use the mode of communication but found their strength is too weak, we need a better library to replace them. The following provides a a number of categories, can be very good Tcp completed the C/S mode of communication. In the second part of this article, I will tell you how to use them Platform: |
Size: 107520 |
Author:liuxfu |
Hits:
Description: 这是用C#做的一个简易的Windows平台下的聊天软件,包括了客户端和服务端的全部源码,注释很详细,有兴趣学习.net应用开发的同学可以下载来学习学习。这个示例包含了了C/S架构软件开发的很多基础知识和思想。
功能包括群发,私聊,发送震动,收到消息发声,闪屏提示等等,大致类似于QQ的多人聊天会话功能。
涉及到的知识主要包括:
1. TCP/IP通信,包括TcpClient , TcpListener , Socket , NetworkStream等几个用于TCP通信的类的实际应用。
2. WIN平台下的多线程程序开发,后台监听线程是网络应用程序开发中的一个基本技术,这个实例的客户端和服务器端都用了后台监听数据包的线程。
3. 客户端和服务器之间交换消息的方法,主要是byte[ ]格式的消息包的消息格式设计和识别,以便让客户端和服务器能够正确交互。
4. 服务端对连接客户的信息存储和状态监控,这个实例用了Hashtable来存储客户连接信息-a chat tool develop by c# in the desk of windows,including source code of client sever ,which can help the students who want to study .net and c# Platform: |
Size: 831488 |
Author:sunrong |
Hits:
Description: TCP Listener
Private server As TcpListener
Private maxConnections As Integer = 10
Private clients(maxConnections) As TcpClient
Private streams(maxConnections) As NetworkStream
Private status(maxConnections) As Boolean
Private clientThreads(maxConnections) As Thread
Private listenThread As Thread
Private boolRun As Boolean
Private lastAllocation As Integer
Private client As Socket-TCP Listener
Private server As TcpListener
Private maxConnections As Integer = 10
Private clients(maxConnections) As TcpClient
Private streams(maxConnections) As NetworkStream
Private status(maxConnections) As Boolean
Private clientThreads(maxConnections) As Thread
Private listenThread As Thread
Private boolRun As Boolean
Private lastAllocation As Integer
Private client As Socket Platform: |
Size: 1024 |
Author:OneTXxL |
Hits:
Description: UDP编程有两种技术,一种是直接使用Socket类,另一种是使用UdpClient类。UdpClient类对基础Socket进行了封装。
与TCP有TcpListener类和TcpClient类不同,UDP只有UdpClient类。
-UDP programming technology using the Socket class, another UdpClient class. The UdpClient class of the underlying Socket package.
With TCP, UDP only UdpClient class TcpListener class and TcpClient class. Platform: |
Size: 43008 |
Author:jake |
Hits:
Description: 这是一个关于socket简单的通信源码,采用了多线程!实现了异步通信。IP地址自动获取主机的,端口为:14220,需要修改的
SocketServer、SocketClient都需要修改
TcpListener tcplistener = new TcpListener(ipa, 14220),修改为需要端口或IP即可,源码功能比较简单适合初学者学习。
注意:
开发环境为Visual Studio 2010-This is a simple socket communication source, using a multi-threaded! Implements asynchronous communication. Automatically obtain IP address of the host, port: 14220, need to be amended
SocketServer, SocketClient need to modify
TcpListener tcplistener = new TcpListener (ipa, 14220), revised as needed to port or IP, source function is relatively simple for beginners to learn.
Note:
Development environment for Visual Studio 2010 Platform: |
Size: 34816 |
Author:jackson_mm |
Hits:
Description: UDP编程有两种技术,一种是直接使用Socket类,另一种是使用UdpClient类。UdpClient类对基础Socket进行了封装。
与TCP有TcpListener类和TcpClient类不同,UDP只有UdpClient类。
有两种建立远程主机的方式:1.使用远程主机名和端口号来创建;2.先创建不带参数的UdpClient实例,再调用Connect方法。
构造函数:UdpClient()、UdpClient(int port)、UdpClient(IPEndPoint localEp)、UdpClient(string remoteHost,int port)(There are two kinds of technologies in UDP programming. One is to use Socket class directly, the other is to use UdpClient class. The UdpClient class encapsulates the underlying Socket.
Unlike TCP, there are TcpListener classes and TcpClient classes. UDP has only UdpClient class.
There are two ways to build a remote host: 1. use a remote host name and port number to create; 2. first create a UdpClient instance without parameter, and then call the Connect method.
Constructors: UdpClient (), UdpClient (int port), UdpClient (IPEndPoint localEp), UdpClient (string remoteHost, int int).) Platform: |
Size: 39936 |
Author:白菜123 |
Hits: