• 大小: 4.89M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2020-12-14
  • 语言: C#
  • 标签: Socket  

资源简介

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.xml

     文件     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.xml

     文件     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.xml

     文件     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.xml

     文件     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.xml

     文件     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.xml

     文件     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.xml

     文件    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.xml

     文件      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.xml

     文件     114688  2016-04-06 22:46  Ruanmou.SocketService\packages\SuperSocket.1.6.6.1\lib\net35\SuperSocket.Socketbase.dll

     文件     238177  2016-04-06 22:46  Ruanmou.SocketService\packages\SuperSocket.1.6.6.1\lib\net35\SuperSocket.Socketbase.xml

     文件      40448  2016-04-06 22:46  Ruanmou.SocketService\packages\SuperSocket.1.6.6.1\lib\net40\SuperSocket.Common.dll

............此处省略143个文件信息

评论

共有 条评论