资源简介
1 SuperSocket引入和使用
2 聊天室之用户登录&唯一登陆
3 在线发消息&确认收到&离线消息
4 心跳检测机制&断线重连
5 CommandFilterAttribute的AOP机制
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
namespace Ruanmou.SocketClient
{
///
/// 发起socket请求
///
class Program
{
static void Main(string[] args)
{
try
{
Console.WriteLine(“启动一个Socket客户端链接“);
int port = 2018;
string host = “127.0.0.1“;//服务器端ip地址
IPAddress ip = IPAddress.Parse(host);
IPEndPoint ipe = new IPEndPoint(ip port);
Socket clientSocket = new Socket(AddressFamily.InterNetwork SocketType.Stream ProtocolType.Tcp);
Console.WriteLine(“准备链接服务器。。。“)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 172823 2018-10-23 22:05 网络协议.xlsx
文件 560 2018-10-25 22:34 Ruanmou.SocketService\.vs\Ruanmou.SocketService\DesignTimeBuild\.dtbcache
..A..H. 117760 2018-10-25 22:34 Ruanmou.SocketService\.vs\Ruanmou.SocketService\v15\.suo
文件 0 2018-10-23 19:39 Ruanmou.SocketService\.vs\Ruanmou.SocketService\v15\Server\sqlite3\db.lock
文件 557056 2018-10-25 22:09 Ruanmou.SocketService\.vs\Ruanmou.SocketService\v15\Server\sqlite3\storage.ide
文件 32768 2018-10-25 19:16 Ruanmou.SocketService\.vs\Ruanmou.SocketService\v15\Server\sqlite3\storage.ide-shm
文件 4140632 2018-10-25 22:34 Ruanmou.SocketService\.vs\Ruanmou.SocketService\v15\Server\sqlite3\storage.ide-wal
文件 9483 2018-10-14 21:47 Ruanmou.SocketService\packages\log4net.2.0.3\.signature.p7s
文件 299008 2013-11-23 10:04 Ruanmou.SocketService\packages\log4net.2.0.3\lib\net10-full\log4net.dll
文件 1432719 2013-11-23 10:04 Ruanmou.SocketService\packages\log4net.2.0.3\lib\net10-full\log4net.xm
文件 299008 2013-11-23 10:04 Ruanmou.SocketService\packages\log4net.2.0.3\lib\net11-full\log4net.dll
文件 1433870 2013-11-23 10:04 Ruanmou.SocketService\packages\log4net.2.0.3\lib\net11-full\log4net.xm
文件 303104 2013-11-23 10:04 Ruanmou.SocketService\packages\log4net.2.0.3\lib\net20-full\log4net.dll
文件 1452231 2013-11-23 10:04 Ruanmou.SocketService\packages\log4net.2.0.3\lib\net20-full\log4net.xm
文件 307200 2013-11-23 10:04 Ruanmou.SocketService\packages\log4net.2.0.3\lib\net35-client\log4net.dll
文件 1506806 2013-11-23 10:04 Ruanmou.SocketService\packages\log4net.2.0.3\lib\net35-client\log4net.xm
文件 311296 2013-11-23 10:04 Ruanmou.SocketService\packages\log4net.2.0.3\lib\net35-full\log4net.dll
文件 1517265 2013-11-23 10:04 Ruanmou.SocketService\packages\log4net.2.0.3\lib\net35-full\log4net.xm
文件 299520 2013-11-23 10:04 Ruanmou.SocketService\packages\log4net.2.0.3\lib\net40-client\log4net.dll
文件 1506806 2013-11-23 10:04 Ruanmou.SocketService\packages\log4net.2.0.3\lib\net40-client\log4net.xm
文件 301056 2013-11-23 10:04 Ruanmou.SocketService\packages\log4net.2.0.3\lib\net40-full\log4net.dll
文件 1517265 2013-11-23 10:04 Ruanmou.SocketService\packages\log4net.2.0.3\lib\net40-full\log4net.xm
文件 1941052 2018-10-25 20:06 Ruanmou.SocketService\packages\log4net.2.0.3\log4net.2.0.3.nupkg
文件 39936 2016-04-06 22:46 Ruanmou.SocketService\packages\SuperSocket.1.6.6.1\lib\net35\SuperSocket.Common.dll
文件 64112 2016-04-06 22:46 Ruanmou.SocketService\packages\SuperSocket.1.6.6.1\lib\net35\SuperSocket.Common.xm
文件 18944 2016-04-06 22:46 Ruanmou.SocketService\packages\SuperSocket.1.6.6.1\lib\net35\SuperSocket.Facility.dll
文件 30037 2016-04-06 22:46 Ruanmou.SocketService\packages\SuperSocket.1.6.6.1\lib\net35\SuperSocket.Facility.xm
文件 114688 2016-04-06 22:46 Ruanmou.SocketService\packages\SuperSocket.1.6.6.1\lib\net35\SuperSocket.Socketba
文件 238177 2016-04-06 22:46 Ruanmou.SocketService\packages\SuperSocket.1.6.6.1\lib\net35\SuperSocket.Socketba
文件 40448 2016-04-06 22:46 Ruanmou.SocketService\packages\SuperSocket.1.6.6.1\lib\net40\SuperSocket.Common.dll
............此处省略143个文件信息
相关资源
- C#Socket网络通信实现多人聊天
- [C#]SignalR实现扫码登录(B/SC/S)源码
- c#socket 聊天室 五子棋 局域网PVP对战
- Socket网络模块Unity c#
- C# Winform Sockets收发Json样例
- C# 抓包分析工具 源码
- C# Socket多客户端异步通信
- C# SOCKET加密文件消息传输通信
- C#窗体基于TCP的Socket多线程通信
- 基于Socket的Winform聊天小程序
- C# 异步 SOCKET 服务和客户端
- C#Socket通信稳定完整版类库
- C#WebSocket初学者必备
- c# socket demo 已经封装成共通
- C#简易WebSocket通信(非服务器实现)
- winform版五子棋源程序
- C# socket心跳
- 一个简单完整的Socket通讯包括Server、
- C# WebSocket Client
- 基于socket的c#实现的五子棋
- c# socket的ftp上传
- C#写的原始套接字数据包转发代码
- C# TCP/IP 聊天系统服务器端
- C# socket实现简单的聊天功能
- C# Socket异步通信+通信与界面分离处理
- [免积分]C# Socket 异步双工通讯
- C# Socket使用
- C# socket通信实例226433
- C#网络版斗地主
- C# ,WinForm 多人聊天
评论
共有 条评论